From 95b3e4bb744932ce4eac14bb350cc0455d15848a Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Sat, 16 Apr 2016 16:34:33 +0200
Subject: mv
---
avg_batt | 4 ----
battery-charge | 4 ++++
crypt_make | 17 -----------------
crypt_mount | 16 ----------------
crypt_umount | 15 ---------------
dd_benchmark | 18 ------------------
ebay-template | 36 ++++++++++++++++++++++++++++++++++++
ebay_template | 36 ------------------------------------
fnf7 | 22 ----------------------
jpegtran-rotate-lossless | 35 +++++++++++++++++++++++++++++++++++
jpegtran_rotate_lossless | 35 -----------------------------------
layout-switch | 16 ++++++++++++++++
layout_switch | 16 ----------------
monitor-cpu-temp | 15 +++++++++++++++
monitor-soft-raid | 7 +++++++
monitor_cpu_temp | 15 ---------------
monitor_hdd_temp | 15 ---------------
monitor_soft_raid | 7 -------
net-profile | 20 ++++++++++++++++++++
net_profile | 20 --------------------
offlineimap-switch | 11 +++++++++++
offlineimap_switch | 11 -----------
try-qlogin | 9 +++++++++
try_qlogin | 9 ---------
upgrade-gentoo | 25 +++++++++++++++++++++++++
upgrade_gentoo | 25 -------------------------
upgrade_kernel | 23 -----------------------
27 files changed, 178 insertions(+), 304 deletions(-)
delete mode 100755 avg_batt
create mode 100755 battery-charge
delete mode 100755 crypt_make
delete mode 100755 crypt_mount
delete mode 100755 crypt_umount
delete mode 100755 dd_benchmark
create mode 100755 ebay-template
delete mode 100755 ebay_template
delete mode 100755 fnf7
create mode 100755 jpegtran-rotate-lossless
delete mode 100755 jpegtran_rotate_lossless
create mode 100755 layout-switch
delete mode 100755 layout_switch
create mode 100755 monitor-cpu-temp
create mode 100755 monitor-soft-raid
delete mode 100755 monitor_cpu_temp
delete mode 100755 monitor_hdd_temp
delete mode 100755 monitor_soft_raid
create mode 100755 net-profile
delete mode 100755 net_profile
create mode 100755 offlineimap-switch
delete mode 100755 offlineimap_switch
create mode 100755 try-qlogin
delete mode 100755 try_qlogin
create mode 100755 upgrade-gentoo
delete mode 100755 upgrade_gentoo
delete mode 100755 upgrade_kernel
diff --git a/avg_batt b/avg_batt
deleted file mode 100755
index 9fd528f..0000000
--- a/avg_batt
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-echo "$(acpi | cut -d ' ' -f 4 | sed 's|[%,]||g' | awk '{ total += $1; count++ } END { print total/count }')%"
-
diff --git a/battery-charge b/battery-charge
new file mode 100755
index 0000000..9fd528f
--- /dev/null
+++ b/battery-charge
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo "$(acpi | cut -d ' ' -f 4 | sed 's|[%,]||g' | awk '{ total += $1; count++ } END { print total/count }')%"
+
diff --git a/crypt_make b/crypt_make
deleted file mode 100755
index 523ffab..0000000
--- a/crypt_make
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/zsh
-
-. /home/pks/bin/func.zsh
-check_root
-
-if [ "$#" -ne 2 ]; then
- echo "missing args: make_crypt "
- exit
-fi
-
-DEVICE=$1
-NAME=$2
-
-cryptsetup -c aes-xts-plain64 -s 256 -h sha256 -i 1000 --use-random -y luksFormat $DEVICE
-cryptsetup luksOpen $DEVICE $NAME
-mkfs.xfs -L $NAME /dev/mapper/$NAME
-
diff --git a/crypt_mount b/crypt_mount
deleted file mode 100755
index 2483aec..0000000
--- a/crypt_mount
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/zsh
-
-. /home/pks/bin/func.zsh
-check_root
-
-if [ "$#" -ne 2 ]; then
- echo "missing args: mount_crypt "
- exit
-fi
-
-DEVICE=$1
-NAME=$2
-
-cryptsetup luksOpen $DEVICE $NAME
-mount /dev/mapper/$NAME
-
diff --git a/crypt_umount b/crypt_umount
deleted file mode 100755
index 5743731..0000000
--- a/crypt_umount
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/zsh
-
-. /home/pks/bin/func.zsh
-check_root
-
-if [ "$#" -ne 1 ]; then
- echo "missing args: umount_crypt "
- exit
-fi
-
-NAME=$1
-
-umount /media/$NAME
-cryptsetup luksClose /dev/mapper/$NAME
-
diff --git a/dd_benchmark b/dd_benchmark
deleted file mode 100755
index 0db9a46..0000000
--- a/dd_benchmark
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-for i in {0..4}; do
-echo "WRITE SPEED"
-dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc
-echo
-
-echo "READ SPEED"
-echo 3 > /proc/sys/vm/drop_caches
-dd if=tempfile of=/dev/null bs=1M count=1024
-echo
-
-echo "BUFFERED READ SPEED"
-dd if=tempfile of=/dev/null bs=1M count=1024
-
-rm tempfile
-done
-
diff --git a/ebay-template b/ebay-template
new file mode 100755
index 0000000..770aa56
--- /dev/null
+++ b/ebay-template
@@ -0,0 +1,36 @@
+#!/usr/bin/env ruby
+
+require 'haml'
+
+template = '
+%div(style="margin:2em;border:0;background:#ffffcc;font-family:Georgia")
+ %div(style="margin:1em")
+ %h1(style="border-bottom:2px solid #fff")
+ Name
+ %p(style="margin-left:5%")
+ Beschreibung
+ %div(style="margin-left:10%")
+ %h2 Bilder:
+ - picCount.times do |i|
+ %a(href="http://pks.rocks/ebay/#{picName}#{i+1}.jpg" target="_blank")
+ %img(style="border:2px solid blue;float:left;margin:20px;" src="http://pks.rocks/ebay/#{picName}#{i+1}t.jpg")
+ %div(style="clear:left")
+ %br
+ %br
+ %p
+ Bitte beachten Sie auch meine anderen Artikel!
Ersteigern Sie mehrere Artikel, so zahlen Sie nur 1x Versandkosten.
+ %h3(style="margin-bottom:0px")
+ Viel Spaß beim Bieten! :-)'
+
+
+if __FILE__ == $0
+ picName = ARGV[0]
+ picCount = ARGV[1]
+
+ haml_engine = Haml::Engine.new(template)
+ puts haml_engine.render(
+ Object.new,
+ locals={:picName => picName, :picCount => picCount.to_i}
+ )
+end
+
diff --git a/ebay_template b/ebay_template
deleted file mode 100755
index 770aa56..0000000
--- a/ebay_template
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'haml'
-
-template = '
-%div(style="margin:2em;border:0;background:#ffffcc;font-family:Georgia")
- %div(style="margin:1em")
- %h1(style="border-bottom:2px solid #fff")
- Name
- %p(style="margin-left:5%")
- Beschreibung
- %div(style="margin-left:10%")
- %h2 Bilder:
- - picCount.times do |i|
- %a(href="http://pks.rocks/ebay/#{picName}#{i+1}.jpg" target="_blank")
- %img(style="border:2px solid blue;float:left;margin:20px;" src="http://pks.rocks/ebay/#{picName}#{i+1}t.jpg")
- %div(style="clear:left")
- %br
- %br
- %p
- Bitte beachten Sie auch meine anderen Artikel!
Ersteigern Sie mehrere Artikel, so zahlen Sie nur 1x Versandkosten.
- %h3(style="margin-bottom:0px")
- Viel Spaß beim Bieten! :-)'
-
-
-if __FILE__ == $0
- picName = ARGV[0]
- picCount = ARGV[1]
-
- haml_engine = Haml::Engine.new(template)
- puts haml_engine.render(
- Object.new,
- locals={:picName => picName, :picCount => picCount.to_i}
- )
-end
-
diff --git a/fnf7 b/fnf7
deleted file mode 100755
index ee5548e..0000000
--- a/fnf7
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env ruby
-
-xrandrq = `xrandr -q`
-
-`touch /tmp/qqqaaa`
-
-if xrandrq.match /VGA1 connected/
- if File.exists? '/tmp/__vga_connected'
- `xrandr --output VGA1 --off`
- `xrandr --output LVDS1 --mode 1024x768`
- `rm /tmp/__vga_connected`
- else
- if xrandrq.match /1680x1050\s+\d+\.\d+\s++/
- `xrandr --output VGA1 --mode 1680x1050 --rate 60 --rotate left`
- elsif xrandrq.match /1600x1200\s+\d+\.\d+\s++/
- `xrandr --output VGA1 --mode 1600x1200 --rate 60 --rotate right`
- end
- `xrandr --output LVDS1 --off`
- `touch /tmp/__vga_connected`
- end
-end
-
diff --git a/jpegtran-rotate-lossless b/jpegtran-rotate-lossless
new file mode 100755
index 0000000..f876e10
--- /dev/null
+++ b/jpegtran-rotate-lossless
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+function usage {
+ echo 'Usage: jpegtran-rotate-lossless.sh <90|180|270> '
+ exit 1
+}
+
+ROTATION=$1
+FILE=$2
+
+if [ $# -ne 2 ]; then
+ usage
+fi
+
+case $ROTATION in
+ 90|180|270)
+ true ;;
+ *)
+ usage ;;
+esac
+
+jpegtran -rotate $ROTATION -trim -copy all $FILE > $FILE-rotate
+if [ $? -ne 0 ]; then
+ echo 'jpegtran-rotate-lossless.sh: jpegtran failed'
+ exit 1
+fi
+
+mv $FILE-rotate $FILE
+if [ $? -ne 0 ]; then
+ 'jpegtran-rotate-lossless.sh: mv failed'
+ exit 1
+fi
+
+exit 0
+
diff --git a/jpegtran_rotate_lossless b/jpegtran_rotate_lossless
deleted file mode 100755
index f876e10..0000000
--- a/jpegtran_rotate_lossless
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-function usage {
- echo 'Usage: jpegtran-rotate-lossless.sh <90|180|270> '
- exit 1
-}
-
-ROTATION=$1
-FILE=$2
-
-if [ $# -ne 2 ]; then
- usage
-fi
-
-case $ROTATION in
- 90|180|270)
- true ;;
- *)
- usage ;;
-esac
-
-jpegtran -rotate $ROTATION -trim -copy all $FILE > $FILE-rotate
-if [ $? -ne 0 ]; then
- echo 'jpegtran-rotate-lossless.sh: jpegtran failed'
- exit 1
-fi
-
-mv $FILE-rotate $FILE
-if [ $? -ne 0 ]; then
- 'jpegtran-rotate-lossless.sh: mv failed'
- exit 1
-fi
-
-exit 0
-
diff --git a/layout-switch b/layout-switch
new file mode 100755
index 0000000..fdc6b65
--- /dev/null
+++ b/layout-switch
@@ -0,0 +1,16 @@
+#!/bin/zsh -x
+
+CUR_US=$(setxkbmap -print | grep xkb_symbols | grep -o "+us+")
+CUR_RU=$(setxkbmap -print | grep xkb_symbols | grep -o "+ru+")
+
+if [[ $CUR_US == "" ]]; then
+ setxkbmap us
+fi
+
+if [[ $CUR_RU == "" ]]; then
+ setxkbmap ru
+fi
+
+setxkbmap -option
+xmodmap ~/.Xmodmap
+
diff --git a/layout_switch b/layout_switch
deleted file mode 100755
index fdc6b65..0000000
--- a/layout_switch
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/zsh -x
-
-CUR_US=$(setxkbmap -print | grep xkb_symbols | grep -o "+us+")
-CUR_RU=$(setxkbmap -print | grep xkb_symbols | grep -o "+ru+")
-
-if [[ $CUR_US == "" ]]; then
- setxkbmap us
-fi
-
-if [[ $CUR_RU == "" ]]; then
- setxkbmap ru
-fi
-
-setxkbmap -option
-xmodmap ~/.Xmodmap
-
diff --git a/monitor-cpu-temp b/monitor-cpu-temp
new file mode 100755
index 0000000..90b2bc9
--- /dev/null
+++ b/monitor-cpu-temp
@@ -0,0 +1,15 @@
+#!/bin/zsh
+
+MAX_TEMP=$1
+
+for i in \
+ /sys/devices/pci0000:00/0000:00:18.3/temp1_input \
+ /sys/devices/pci0000:00/0000:00:19.3/temp1_input \
+ /sys/devices/pci0000:00/0000:00:1a.3/temp1_input \
+ /sys/devices/pci0000:00/0000:00:1b.3/temp1_input; do
+ TEMP=$(cat $i)
+ if [ $TEMP -gt $MAX_TEMP ]; then
+ logger "Some CPU temp @$TEMP (/1000)!"
+ fi
+done
+
diff --git a/monitor-soft-raid b/monitor-soft-raid
new file mode 100755
index 0000000..1dc7da4
--- /dev/null
+++ b/monitor-soft-raid
@@ -0,0 +1,7 @@
+#!/bin/zsh
+
+T="[$(printf 'U%.0s' {1..$1})]"
+S=$(awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' /dev/null)
- if [ "$TEMP" != "" ]; then
- if [ $TEMP -gt $MAX_TEMP ]; then logger "$DRIVE temp at $TEMP"; fi
- fi
-done
-
diff --git a/monitor_soft_raid b/monitor_soft_raid
deleted file mode 100755
index 1dc7da4..0000000
--- a/monitor_soft_raid
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/zsh
-
-T="[$(printf 'U%.0s' {1..$1})]"
-S=$(awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' /tmp/wpa_supplicant.log &
+ sudo /etc/init.d/dhcpcd start
+ sleep 30
+ sudo rc-config start ntp-client
+}
+
+if [ ! -f ~/.net_profiles/$1.conf ]; then
+ echo "no such profile"
+ exit
+fi
+
+setup_wifi $1
+
+
diff --git a/net_profile b/net_profile
deleted file mode 100755
index 57c278a..0000000
--- a/net_profile
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-DEV=`ls -1 /sys/class/net | grep wlan`
-
-setup_wifi()
-{
- sudo wpa_supplicant -D wext -i $DEV -c ~/.net_profiles/$1.conf &>/tmp/wpa_supplicant.log &
- sudo /etc/init.d/dhcpcd start
- sleep 30
- sudo rc-config start ntp-client
-}
-
-if [ ! -f ~/.net_profiles/$1.conf ]; then
- echo "no such profile"
- exit
-fi
-
-setup_wifi $1
-
-
diff --git a/offlineimap-switch b/offlineimap-switch
new file mode 100755
index 0000000..6f835cd
--- /dev/null
+++ b/offlineimap-switch
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case `date +"%a"` in
+ Sat|Sun)
+ offlineimap -a private
+ ;;
+ *)
+ offlineimap
+ ;;
+esac
+
diff --git a/offlineimap_switch b/offlineimap_switch
deleted file mode 100755
index 6f835cd..0000000
--- a/offlineimap_switch
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-case `date +"%a"` in
- Sat|Sun)
- offlineimap -a private
- ;;
- *)
- offlineimap
- ;;
-esac
-
diff --git a/try-qlogin b/try-qlogin
new file mode 100755
index 0000000..b939117
--- /dev/null
+++ b/try-qlogin
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+trap 'echo Control-C trap caught; exit 1' 2
+
+while true
+do
+ qlogin -l mem_free=$1
+done
+
diff --git a/try_qlogin b/try_qlogin
deleted file mode 100755
index b939117..0000000
--- a/try_qlogin
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-trap 'echo Control-C trap caught; exit 1' 2
-
-while true
-do
- qlogin -l mem_free=$1
-done
-
diff --git a/upgrade-gentoo b/upgrade-gentoo
new file mode 100755
index 0000000..af56971
--- /dev/null
+++ b/upgrade-gentoo
@@ -0,0 +1,25 @@
+#!/bin/zsh
+
+cd /usr
+rsync -avv portage/ portage_/
+umount portage
+rm portage.squashfs
+mv portage_ portage
+perl-cleaner --reallyall
+python-updater
+emaint --check all
+emaint --fix all
+emerge --sync
+emerge -avuDN --with-bdeps y --keep-going world
+echo "-------------------------"
+read p\?"press enter to continue... "
+etc-update
+emerge -av --depclean
+revdep-rebuild
+eclean -d distfiles
+localepurge
+mksquashfs portage portage.squashfs -comp xz
+rm -rf /usr/portage
+mkdir /usr/portage
+mount portage
+
diff --git a/upgrade_gentoo b/upgrade_gentoo
deleted file mode 100755
index af56971..0000000
--- a/upgrade_gentoo
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/zsh
-
-cd /usr
-rsync -avv portage/ portage_/
-umount portage
-rm portage.squashfs
-mv portage_ portage
-perl-cleaner --reallyall
-python-updater
-emaint --check all
-emaint --fix all
-emerge --sync
-emerge -avuDN --with-bdeps y --keep-going world
-echo "-------------------------"
-read p\?"press enter to continue... "
-etc-update
-emerge -av --depclean
-revdep-rebuild
-eclean -d distfiles
-localepurge
-mksquashfs portage portage.squashfs -comp xz
-rm -rf /usr/portage
-mkdir /usr/portage
-mount portage
-
diff --git a/upgrade_kernel b/upgrade_kernel
deleted file mode 100755
index 49fab66..0000000
--- a/upgrade_kernel
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-if [ ! -f .config ]; then echo "Call from kernel source dir!"; exit; fi
-V=`pwd | ruby -e "puts STDIN.gets.split('/').last.split('-')[1..-1].join '-'"`;
-make mrproper
-cp -v ../config .config
-make
-sudo make modules_install
-sudo cp -v arch/x86/boot/bzImage /boot/kernel
-sudo md5sum /boot/kernel > /tmp/kernel.md5
-sudo mv /tmp/kernel.md5 /boot/kernel.md5
-sudo /sbin/lilo
-sudo rm /usr/src/linux
-sudo ln -s $(pwd) /usr/src/linux
-cd /home/pks/src/kernel/tp_smapi/
-sudo make HDAPS=1 install KVER=$V KSRC=/home/pks/src/kernel/linux-$V KBUILD=/home/pks/src/kernel/linux-$V
-sudo make clean
-sudo chown -R pks:pks * .* /home/pks/src/kernel/tp_smapi/ /home/pks/src/kernel/linux-*
-echo "================="
-cd /lib/modules/
-pwd
-ls -lah
-
--
cgit v1.2.3