From a64487d5db57b9e281a5953b082618d2c1fca8a4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 13 Jan 2013 17:32:58 -0200 Subject: Removing old scripts and cleaning up some code --- misc/annex-fsck | 9 -- misc/convert-gitosis-conf | 127 ------------------------ misc/email/checkmail | 14 +++ misc/email/checkmail.sh | 9 -- misc/email/vcard-filter | 0 misc/eterm-trans | 2 +- misc/firefox-rotate | 21 ---- misc/freeshell | 5 + misc/google | 17 ---- misc/mount-tablet | 21 ---- misc/noisecd | 59 ------------ misc/parse-remind | 41 ++++++++ misc/parse_remind.pl | 41 -------- misc/ps_mem.py | 240 ---------------------------------------------- misc/scan | 1 - misc/shell | 2 +- misc/snownews | 1 - misc/splash.sh | 7 -- misc/term-color | 43 --------- misc/umount-tablet | 1 - misc/wifi | 2 +- misc/xbitchx | 20 ---- misc/xcamp | 17 ---- misc/xfeast | 15 --- misc/xgkrellm | 7 -- misc/xterm | 1 - 26 files changed, 63 insertions(+), 660 deletions(-) delete mode 100755 misc/annex-fsck delete mode 100755 misc/convert-gitosis-conf create mode 100755 misc/email/checkmail delete mode 100755 misc/email/checkmail.sh mode change 100644 => 100755 misc/email/vcard-filter delete mode 100755 misc/firefox-rotate delete mode 100755 misc/google delete mode 100755 misc/mount-tablet delete mode 100755 misc/noisecd create mode 100755 misc/parse-remind delete mode 100644 misc/parse_remind.pl delete mode 100755 misc/ps_mem.py delete mode 100755 misc/scan delete mode 100755 misc/snownews delete mode 100755 misc/splash.sh delete mode 100755 misc/term-color delete mode 120000 misc/umount-tablet delete mode 100755 misc/xbitchx delete mode 100755 misc/xcamp delete mode 100755 misc/xfeast delete mode 100755 misc/xgkrellm delete mode 100755 misc/xterm (limited to 'misc') diff --git a/misc/annex-fsck b/misc/annex-fsck deleted file mode 100755 index 2ef8066..0000000 --- a/misc/annex-fsck +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -cd /var/cache/media - -for file in *; do - if [ -d "$file/.git" ]; then - ( echo "Checking $file..." && cd $file && git annex fsck --fast | grep -v " ok" | tee -a /tmp/annex-fsck.log ) - fi -done diff --git a/misc/convert-gitosis-conf b/misc/convert-gitosis-conf deleted file mode 100755 index 9b92f68..0000000 --- a/misc/convert-gitosis-conf +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/perl -w -# -# migrate gitosis.conf to gitolite.conf format -# -# Based on gl-conf-convert by: Sitaram Chamarty -# Rewritten by: Behan Webster -# - -use strict; -use warnings; - -if (not @ARGV and -t or @ARGV and $ARGV[0] eq '-h') { - print "Usage:\n gl-conf-convert < gitosis.conf > gitolite.conf\n(please see the documentation for details)\n"; - exit 1; -} - -my @comments = (); -my $groupname; -my %groups; -my $reponame; -my %repos; - -while (<>) -{ - # not supported - if (/^repositories *=/ or /^map /) { - print STDERR "not supported: $_"; - s/^/NOT SUPPORTED: /; - print; - next; - } - - # normalise whitespace to help later regexes - chomp; - s/\s+/ /g; - s/ ?= ?/ = /; - s/^ //; - s/ $//; - - if (/^\s*$/ and @comments > 1) { - @{$repos{$reponame}{comments}} = @comments if $reponame; - @{$groups{$groupname}{comments}} = @comments if $groupname; - @comments = (); - } elsif (/^\s*#/) { - push @comments, $_; - } elsif (/^\[repo\s+(.*?)\]$/) { - $groupname = ''; - $reponame = $1; - $reponame =~ s/\.git$//; - } elsif (/^\[gitosis\]$/) { - $groupname = ''; - $reponame = '@all'; - } elsif (/^gitweb\s*=\s*yes/i) { - push @{$repos{$reponame}{R}}, 'gitweb'; - } elsif (/^daemon\s*=\s*yes/i) { - push @{$repos{$reponame}{R}}, 'daemon'; - } elsif (/^description\s*=\s*(.+?)$/) { - $repos{$reponame}{desc} = $1; - } elsif (/^owner\s*=\s*(.+?)$/) { - $repos{$reponame}{owner} = $1; - } elsif (/^\[group\s+(.*)\]$/) { - $reponame = ''; - $groupname = $1; - } elsif (/^members\s*=\s*(.*)/) { - push @{$groups{$groupname}{users}}, map {s/\@([^.]+)$/_$1/g; $_} split(' ', $1); - } elsif (/^write?able\s*=\s*(.*)/) { - foreach my $repo (split(' ', $1)) { - $repo =~ s/\.git$//; - push @{$repos{$repo}{RW}}, "\@$groupname"; - } - } elsif (/^readonly\s*=\s*(.*)/) { - foreach my $repo (split(' ', $1)) { - $repo =~ s/\.git$//; - push @{$repos{$repo}{R}}, "\@$groupname"; - } - } -} - -#use Data::Dumper; -#print Dumper(\%repos); -#print Dumper(\%groups); - -# Groups -print "#\n# Groups\n#\n\n"; -foreach my $grp (sort keys %groups) { - next unless @{$groups{$grp}{users}}; - printf join("\n", @{$groups{$grp}{comments}})."\n" if $groups{$grp}{comments}; - printf "\@%-19s = %s\n", $grp, join(' ', @{$groups{$grp}{users}}); -} - -# Gitweb -print "\n#\n# Gitweb\n#\n\n"; -foreach my $repo (sort keys %repos) { - if ($repos{$repo}{desc}) { - @{$repos{$repo}{R}} = grep(!/^gitweb$/, @{$repos{$repo}{R}}); - print $repo; - print " \"$repos{$repo}{owner}\"" if $repos{$repo}{owner}; - print " = \"$repos{$repo}{desc}\"\n"; - } -} - -# Repos -print "\n#\n# Repos\n#\n"; -foreach my $repo (sort keys %repos) { - print "\n"; - printf join("\n", @{$repos{$repo}{comments}})."\n" if $repos{$repo}{comments}; - #if ($repos{$repo}{desc}) { - # @{$repos{$repo}{R}} = grep(!/^gitweb$/, @{$repos{$repo}{R}}); - #} - print "repo\t$repo\n"; - foreach my $access (qw(RW+ RW R)) { - next unless $repos{$repo}{$access}; - my @keys; - foreach my $key (@{$repos{$repo}{$access}}) { - if ($key =~ /^\@(.*)/) { - next unless defined $groups{$1} and @{$groups{$1}{users}}; - } - push @keys, $key; - } - printf "\t$access\t= %s\n", join(' ', @keys) if @keys; - } - #if ($repos{$repo}{desc}) { - # print $repo; - # print " \"$repos{$repo}{owner}\"" if $repos{$repo}{owner}; - # print " = \"$repos{$repo}{desc}\"\n"; - #} -} diff --git a/misc/email/checkmail b/misc/email/checkmail new file mode 100755 index 0000000..078f111 --- /dev/null +++ b/misc/email/checkmail @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Simple mail counter +# Inspired by http://www.vivaolinux.com.br/dicas/verDica.php?codigo=2432 +# + +# Fetch and compute +FETCH=`fetchmail -c` +TOTAL=`echo $FETCH | awk '{ print $1 }'` +SEEN=`echo $FETCH | awk '{ print $3 }' | sed -e 's/(//'` +NEW=`echo "$TOTAL - $SEEN" | bc` + +# Display response +echo $NEW/$TOTAL diff --git a/misc/email/checkmail.sh b/misc/email/checkmail.sh deleted file mode 100755 index 3a21c9a..0000000 --- a/misc/email/checkmail.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# inspirado em http://www.vivaolinux.com.br/dicas/verDica.php?codigo=2432 -# - -FETCH=`fetchmail -c` -TOTAL=`echo $FETCH | awk '{ print $1 }'` -SEEN=`echo $FETCH | awk '{ print $3 }' | sed -e 's/(//'` -NEW=`echo "$TOTAL - $SEEN" | bc` -echo $NEW/$TOTAL diff --git a/misc/email/vcard-filter b/misc/email/vcard-filter old mode 100644 new mode 100755 diff --git a/misc/eterm-trans b/misc/eterm-trans index 5003ddb..1a6d52d 100755 --- a/misc/eterm-trans +++ b/misc/eterm-trans @@ -1,6 +1,6 @@ #!/bin/bash # -# eterm-trans: wrapper script for a transparent Eterm +# Wrapper script for a transparent terminal # Eterm --trans --font1 monospace --scrollbar 0 -f white --buttonbar 0 --borderless -g 124x55+10+20 -c white -neterm diff --git a/misc/firefox-rotate b/misc/firefox-rotate deleted file mode 100755 index e116e0a..0000000 --- a/misc/firefox-rotate +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# firefox profile local backup -# - -BACKUPDIR="$HOME/backups/mozilla" - -if [ ! -d "/$BACKUPDIR" ]; then - mkdir -p $BACKUPDIR -fi - -if [ -d "/$BACKUPDIR/mozilla.2" ]; then - rm -rf /$BACKUPDIR/mozilla.2 -fi - -if [ -d "/$BACKUPDIR/mozilla.1" ]; then - mv /$BACKUPDIR/mozilla.1 /$BACKUPDIR/mozilla.2 -fi - -cp -Rp $HOME/.mozilla /$BACKUPDIR/mozilla.1 - diff --git a/misc/freeshell b/misc/freeshell index a2f6e38..ad98ff2 100755 --- a/misc/freeshell +++ b/misc/freeshell @@ -1,4 +1,9 @@ #!/usr/bin/expect +# +# Simple telnet application to log in a server +# WARNING: passphrase is sent in the clear! +# + spawn telnet freeshell.org # Not absolutely necessary, but good to keep the spawn_id for later set telnet $spawn_id diff --git a/misc/google b/misc/google deleted file mode 100755 index b0e15ea..0000000 --- a/misc/google +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -BROWSER=lynx - -if [ $# -eq 0 ] -then - echo "Usage: chkargs argument..." 1>&2 - exit 1 -fi - -search=$1 -while shift -do - search="$search+$1" -done - -$BROWSER "http://www.google.com/search?q=$search" & diff --git a/misc/mount-tablet b/misc/mount-tablet deleted file mode 100755 index b73c2eb..0000000 --- a/misc/mount-tablet +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# -# mount-tablet -# - -# Parameters -BASENAME="`basename $0`" -MOUNTPOINT="/media/tablet" - -# Set sudo config -if [ "`whoami`" != 'root' ]; then - sudo="sudo" -fi - -if [ "$BASENAME" == "mount-tablet" ]; then - $sudo mkdir -p $MOUNTPOINT - $sudo mtpfs -o allow_other $MOUNTPOINT -elif [ "$BASENAME" == "umount-tablet" ]; then - $sudo umount $MOUNTPOINT -fi - diff --git a/misc/noisecd b/misc/noisecd deleted file mode 100755 index c83bbc1..0000000 --- a/misc/noisecd +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# -# noisecd: add noise cd to rhatto's -# noise cd txt database -# -# feedback: rhatto@riseup.net | GPL -# -# cansado(a) de nao saber onde estah aquela musica ou arquivo num -# sistema de armazenamento distribuido em dezenas de cds? -# -# aqui estah sua solucao! mantenha uma arvore completa de todos os -# seus arquivos disponiveis em midia removivel no seu proprio -# diretorio pessoal, com um truque muito simples. -# -# etiquete os seus cds de mp3, por exemplo, de noise 1, noise 2, -# noise 3, ..., noise n; em seguida, crie n pastas com os nomes iguais -# ao nome de cada cd; em seguida, monte o cd e entre em sua pasta -# especifica e de um comando do tipo -# -# cp -R -s /cdrom/* . -# -# isso criara recursivamente em sua pasta os links simbolicos que vao -# direto pros arquivos do cd, desde que este seja o cd atualmente montado. -# -# se voce fizer com todos os seus cds de musica, o resultado sera uma -# arvore completa contendo links simbolicos para arquivos dos cds. -# -# com isso voce pode procurar suas musicas mais facilmente atraves do find -# ou do locate, ou entao navegando entre as pastas; uma vez achado o -# arquivo desejado, eh soh montar o respectivo cd e ir pra galera! -# -# este script eh um exemplo de como automatizar a tarefa de criar essa arvore. -# - -NOISE_TREE=/var/data/catalogo/noise -NOISE_DATABASE=$NOISE_TREE/noise-cd.txt -NOISE_DIR=/media/cdrom -NOISE_MODE="complex" - -if [ -z "$1" ]; then - echo "usage: `basename $0` " - exit 1 -fi - -cd $NOISE_DIR -ls -R -A -1 | sed -e "s/^/$1 /" >> $NOISE_DATABASE - -if [ "$NOISE_MODE" != "simple" ]; then - - mkdir "$NOISE_TREE/noise-$1" - cd "$NOISE_TREE/noise-$1" - cp -R -s $NOISE_DIR/* . - - cd "$NOISE_TREE" - rm -f noise-tree.tar.gz; cd .. - tar zcvf noise-tree.tar.gz "$NOISE_TREE/" - mv noise-tree.tar.gz "$NOISE_TREE/" - -fi diff --git a/misc/parse-remind b/misc/parse-remind new file mode 100755 index 0000000..bdd9f23 --- /dev/null +++ b/misc/parse-remind @@ -0,0 +1,41 @@ +#!/usr/bin/perl +# +# This script is designed to have an email piped to it eg. from mutt. +# It will split apart all the text/calendar attachments and enter them into +# the 'remind' calendar. +# + +use strict; +use warnings; + +use MIME::Parser; + +my $CONVERT = '~/.mutt/ical2rem.pl'; +my $REMINDERS = '~/remind/mutt.rem'; + +################################################################################ + +my $parser = new MIME::Parser; +$parser->output_under('/tmp'); +my $entity = $parser->parse(\*STDIN); + +my @parts = $entity->parts(); +my $count = 0; + +foreach my $part (@parts) { + if ($part->head->mime_type eq 'text/calendar') { + my $body = $part->bodyhandle; + my $cmd = $CONVERT.' '.$body->path.' >> '.$REMINDERS; + print STDERR `$cmd`; + last if ($? != 0); + $count++; + } +} + +$parser->filer->purge; +if ($count == 0) { + print STDERR "No calendar entries found."; + exit(1); +} + +exit(0); diff --git a/misc/parse_remind.pl b/misc/parse_remind.pl deleted file mode 100644 index bdd9f23..0000000 --- a/misc/parse_remind.pl +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl -# -# This script is designed to have an email piped to it eg. from mutt. -# It will split apart all the text/calendar attachments and enter them into -# the 'remind' calendar. -# - -use strict; -use warnings; - -use MIME::Parser; - -my $CONVERT = '~/.mutt/ical2rem.pl'; -my $REMINDERS = '~/remind/mutt.rem'; - -################################################################################ - -my $parser = new MIME::Parser; -$parser->output_under('/tmp'); -my $entity = $parser->parse(\*STDIN); - -my @parts = $entity->parts(); -my $count = 0; - -foreach my $part (@parts) { - if ($part->head->mime_type eq 'text/calendar') { - my $body = $part->bodyhandle; - my $cmd = $CONVERT.' '.$body->path.' >> '.$REMINDERS; - print STDERR `$cmd`; - last if ($? != 0); - $count++; - } -} - -$parser->filer->purge; -if ($count == 0) { - print STDERR "No calendar entries found."; - exit(1); -} - -exit(0); diff --git a/misc/ps_mem.py b/misc/ps_mem.py deleted file mode 100755 index deae67f..0000000 --- a/misc/ps_mem.py +++ /dev/null @@ -1,240 +0,0 @@ -#!/usr/bin/env python - -# Try to determine how much RAM is currently being used per program. -# Note per _program_, not per process. So for example this script -# will report RAM used by all httpd process together. In detail it reports: -# sum(private RAM for program processes) + sum(Shared RAM for program processes) -# The shared RAM is problematic to calculate, and this script automatically -# selects the most accurate method available for your kernel. - -# Author: P@draigBrady.com -# Source: http://www.pixelbeat.org/scripts/ps_mem.py - -# V1.0 06 Jul 2005 Initial release -# V1.1 11 Aug 2006 root permission required for accuracy -# V1.2 08 Nov 2006 Add total to output -# Use KiB,MiB,... for units rather than K,M,... -# V1.3 22 Nov 2006 Ignore shared col from /proc/$pid/statm for -# 2.6 kernels up to and including 2.6.9. -# There it represented the total file backed extent -# V1.4 23 Nov 2006 Remove total from output as it's meaningless -# (the shared values overlap with other programs). -# Display the shared column. This extra info is -# useful, especially as it overlaps between programs. -# V1.5 26 Mar 2007 Remove redundant recursion from human() -# V1.6 05 Jun 2007 Also report number of processes with a given name. -# Patch from riccardo.murri@gmail.com -# V1.7 20 Sep 2007 Use PSS from /proc/$pid/smaps if available, which -# fixes some over-estimation and allows totalling. -# Enumerate the PIDs directly rather than using ps, -# which fixes the possible race between reading -# RSS with ps, and shared memory with this program. -# Also we can show non truncated command names. -# V1.8 28 Sep 2007 More accurate matching for stats in /proc/$pid/smaps -# as otherwise could match libraries causing a crash. -# Patch from patrice.bouchand.fedora@gmail.com -# V1.9 20 Feb 2008 Fix invalid values reported when PSS is available. -# Reported by Andrey Borzenkov - -# Notes: -# -# All interpreted programs where the interpreter is started -# by the shell or with env, will be merged to the interpreter -# (as that's what's given to exec). For e.g. all python programs -# starting with "#!/usr/bin/env python" will be grouped under python. -# You can change this by changing comm= to args= below but that will -# have the undesirable affect of splitting up programs started with -# differing parameters (for e.g. mingetty tty[1-6]). -# -# For 2.6 kernels up to and including 2.6.13 and later 2.4 redhat kernels -# (rmap vm without smaps) it can not be accurately determined how many pages -# are shared between processes in general or within a program in our case: -# http://lkml.org/lkml/2005/7/6/250 -# A warning is printed if overestimation is possible. -# In addition for 2.6 kernels up to 2.6.9 inclusive, the shared -# value in /proc/$pid/statm is the total file-backed extent of a process. -# We ignore that, introducing more overestimation, again printing a warning. -# Since kernel 2.6.23-rc8-mm1 PSS is available in smaps, which allows -# us to calculate a more accurate value for the total RAM used by programs. -# -# I don't take account of memory allocated for a program -# by other programs. For e.g. memory used in the X server for -# a program could be determined, but is not. - -import sys, os, string - -if os.geteuid() != 0: - sys.stderr.write("Sorry, root permission required.\n"); - sys.exit(1) - -PAGESIZE=os.sysconf("SC_PAGE_SIZE")/1024 #KiB -our_pid=os.getpid() - -#(major,minor,release) -def kernel_ver(): - kv=open("/proc/sys/kernel/osrelease").readline().split(".")[:3] - for char in "-_": - kv[2]=kv[2].split(char)[0] - return (int(kv[0]), int(kv[1]), int(kv[2])) - -kv=kernel_ver() - -have_pss=0 - -#return Private,Shared -#Note shared is always a subset of rss (trs is not always) -def getMemStats(pid): - global have_pss - Private_lines=[] - Shared_lines=[] - Pss_lines=[] - Rss=int(open("/proc/"+str(pid)+"/statm").readline().split()[1])*PAGESIZE - if os.path.exists("/proc/"+str(pid)+"/smaps"): #stat - for line in open("/proc/"+str(pid)+"/smaps").readlines(): #open - if line.startswith("Shared"): - Shared_lines.append(line) - elif line.startswith("Private"): - Private_lines.append(line) - elif line.startswith("Pss"): - have_pss=1 - Pss_lines.append(line) - Shared=sum([int(line.split()[1]) for line in Shared_lines]) - Private=sum([int(line.split()[1]) for line in Private_lines]) - #Note Shared + Private = Rss above - #The Rss in smaps includes video card mem etc. - if have_pss: - pss_adjust=0.5 #add 0.5KiB as this average error due to trunctation - Pss=sum([float(line.split()[1])+pss_adjust for line in Pss_lines]) - Shared = Pss - Private - elif (2,6,1) <= kv <= (2,6,9): - Shared=0 #lots of overestimation, but what can we do? - Private = Rss - else: - Shared=int(open("/proc/"+str(pid)+"/statm").readline().split()[2]) - Shared*=PAGESIZE - Private = Rss - Shared - return (Private, Shared) - -def getCmdName(pid): - cmd = file("/proc/%d/status" % pid).readline()[6:-1] - exe = os.path.basename(os.path.realpath("/proc/%d/exe" % pid)) - if exe.startswith(cmd): - cmd=exe #show non truncated version - #Note because we show the non truncated name - #one can have separated programs as follows: - #584.0 KiB + 1.0 MiB = 1.6 MiB mozilla-thunder (exe -> bash) - # 56.0 MiB + 22.2 MiB = 78.2 MiB mozilla-thunderbird-bin - return cmd - -cmds={} -shareds={} -count={} -for pid in os.listdir("/proc/"): - try: - pid = int(pid) #note Thread IDs not listed in /proc/ which is good - if pid == our_pid: continue - except: - continue - try: - cmd = getCmdName(pid) - except: - #permission denied or - #kernel threads don't have exe links or - #process gone - continue - try: - private, shared = getMemStats(pid) - except: - continue #process gone - if shareds.get(cmd): - if have_pss: #add shared portion of PSS together - shareds[cmd]+=shared - elif shareds[cmd] < shared: #just take largest shared val - shareds[cmd]=shared - else: - shareds[cmd]=shared - cmds[cmd]=cmds.setdefault(cmd,0)+private - if count.has_key(cmd): - count[cmd] += 1 - else: - count[cmd] = 1 - -#Add shared mem for each program -total=0 -for cmd in cmds.keys(): - cmds[cmd]=cmds[cmd]+shareds[cmd] - total+=cmds[cmd] #valid if PSS available - -sort_list = cmds.items() -sort_list.sort(lambda x,y:cmp(x[1],y[1])) -sort_list=filter(lambda x:x[1],sort_list) #get rid of zero sized processes - -#The following matches "du -h" output -#see also human.py -def human(num, power="Ki"): - powers=["Ki","Mi","Gi","Ti"] - while num >= 1000: #4 digits - num /= 1024.0 - power=powers[powers.index(power)+1] - return "%.1f %s" % (num,power) - -def cmd_with_count(cmd, count): - if count>1: - return "%s (%u)" % (cmd, count) - else: - return cmd - -print " Private + Shared = RAM used\tProgram \n" -for cmd in sort_list: - print "%8sB + %8sB = %8sB\t%s" % (human(cmd[1]-shareds[cmd[0]]), - human(shareds[cmd[0]]), human(cmd[1]), - cmd_with_count(cmd[0], count[cmd[0]])) -if have_pss: - print "-" * 33 - print " " * 24 + "%8sB" % human(total) - print "=" * 33 -print "\n Private + Shared = RAM used\tProgram \n" - -#Warn of possible inaccuracies -#2 = accurate & can total -#1 = accurate only considering each process in isolation -#0 = some shared mem not reported -#-1= all shared mem not reported -def shared_val_accuracy(): - """http://wiki.apache.org/spamassassin/TopSharedMemoryBug""" - if kv[:2] == (2,4): - if open("/proc/meminfo").read().find("Inact_") == -1: - return 1 - return 0 - elif kv[:2] == (2,6): - if os.path.exists("/proc/"+str(os.getpid())+"/smaps"): - if open("/proc/"+str(os.getpid())+"/smaps").read().find("Pss:")!=-1: - return 2 - else: - return 1 - if (2,6,1) <= kv <= (2,6,9): - return -1 - return 0 - else: - return 1 - -vm_accuracy = shared_val_accuracy() -if vm_accuracy == -1: - sys.stderr.write( - "Warning: Shared memory is not reported by this system.\n" - ) - sys.stderr.write( - "Values reported will be too large, and totals are not reported\n" - ) -elif vm_accuracy == 0: - sys.stderr.write( - "Warning: Shared memory is not reported accurately by this system.\n" - ) - sys.stderr.write( - "Values reported could be too large, and totals are not reported\n" - ) -elif vm_accuracy == 1: - sys.stderr.write( - "Warning: Shared memory is slightly over-estimated by this system\n" - "for each program, so totals are not reported.\n" - ) diff --git a/misc/scan b/misc/scan deleted file mode 100755 index 0b4c9eb..0000000 --- a/misc/scan +++ /dev/null @@ -1 +0,0 @@ -sudo pxscan --port=0x378 --pos=0.0x0.0 --dim=8.49554140127x11.7 --color=-30/0/1.0 --res=100 -n $HOME/scanned-image.tif diff --git a/misc/shell b/misc/shell index ad86b8f..26632b0 100755 --- a/misc/shell +++ b/misc/shell @@ -1,6 +1,6 @@ #!/bin/bash # -# shell: wrapper for a simple terminal console +# Wrapper script for a simple terminal # Eterm -g 110x45+320+90 +sb -f white -F smooth --borderless no --buttonbar 0 --scrollbar 0 -P None -nterminal diff --git a/misc/snownews b/misc/snownews deleted file mode 100755 index 3cf3a9f..0000000 --- a/misc/snownews +++ /dev/null @@ -1 +0,0 @@ -Eterm --background-pixmap 0 --scrollbar 0 --buttonbar 0 -g 125x43+6-45 -F vga -n snownews -e snownews diff --git a/misc/splash.sh b/misc/splash.sh deleted file mode 100755 index 415f36e..0000000 --- a/misc/splash.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ -z $2 ]; then echo "usage: $0 "; exit 1; fi - -cd /boot -mkinitrd -c $1 -splash -s -f /etc/bootsplash/themes/$2/config/bootsplash-1024x768.cfg >> /boot/initrd.gz diff --git a/misc/term-color b/misc/term-color deleted file mode 100755 index 85bf44b..0000000 --- a/misc/term-color +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env python -# Copyright (C) 2006 by Johannes Zellner, -# modified by mac@calmar.ws to fit my output needs -# modified by crncosta@carloscosta.org to fit my output needs -# pyroscope.project@gmail.com added a final "tput init", and changed the output format - -import os -import sys - -def echo(msg): - os.system('echo -n "' + str(msg) + '"') - -def out(n): - os.system("tput setab " + str(n) + "; echo -n " + ("\"% 4d\"" % n)) - os.system("tput setab 0") - -if os.getenv("TERM") in ("xterm", "screen"): - os.putenv("TERM", os.getenv("TERM") + "-256color") - -try: - # normal colors 1 - 16 - os.system("tput setaf 16") - for n in range(8): - out(n) - echo("\n") - for n in range(8, 16): - out(n) - - echo("\n") - echo("\n") - - y=16 - while y < 256: - for z in range(0,18): - out(y) - y += 1 - if y >= 256: break - - echo("\n") - - echo("\n") -finally: - os.system("tput init") diff --git a/misc/umount-tablet b/misc/umount-tablet deleted file mode 120000 index ee40196..0000000 --- a/misc/umount-tablet +++ /dev/null @@ -1 +0,0 @@ -mount-tablet \ No newline at end of file diff --git a/misc/wifi b/misc/wifi index cfe6151..6a3a3b5 100755 --- a/misc/wifi +++ b/misc/wifi @@ -1,6 +1,6 @@ #!/bin/bash # -# Wifi initializer. +# Wifi initializer # #DEVICE="ath0" diff --git a/misc/xbitchx b/misc/xbitchx deleted file mode 100755 index e5b524e..0000000 --- a/misc/xbitchx +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# xbitchx: execute bitchx under a X Terminal -# - -# Using rxvt -# rxvt -bg black +sb -fg white -fn vga -g 120x40+30+55 -name BitchX -e BitchX -p 994 -ssl irc.indymedia.org - -# Old version using Eterm -# Eterm --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F vga --borderless no --buttonbar 0 \ -# -g 120x40+30+55 -nBitchX -e BitchX -p 994 -ssl irc.indymedia.org - -# Old version using feast and Eterm -# xfeast -# Eterm --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F vga --borderless no --buttonbar 0 \ -# -g 120x40+30+55 -nBitchX -e BitchX -p 994 -ssl irc.indymedia.org - -# Current version -Eterm --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F vga --borderless no --buttonbar 0 \ - -g 120x40+30+55 -nBitchX -e BitchX -p 6667 127.0.0.1 diff --git a/misc/xcamp b/misc/xcamp deleted file mode 100755 index 6ae9fd2..0000000 --- a/misc/xcamp +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# xcamp: wrapper for camp console music player -# - -# Set possible geometries -BOTTOM_LEFT="75x20+10+410" -BOTTOM_RIGHT="75x20+415+410" -TOP_LEFT="75x20+10+5" -TOP_RIGHT="75x20+415+5" -TOP_RIGHT_2="500+420" -TOP_RIGHT_3="500+385" - -# Set default geometry -GEOMETRY="$TOP_RIGHT_3" - -Eterm --trans -F VGA --scrollbar 0 --buttonbar 0 --borderless -g $GEOMETRY -e camp diff --git a/misc/xfeast b/misc/xfeast deleted file mode 100755 index 8a8504a..0000000 --- a/misc/xfeast +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# -# xfeast: execute silc gateway -# - -pid="$HOME/tmp/silc.pid" -if [[ -f "$pid" ]]; then - if `ps $pid | grep -q $pid`; then - kill `cat $pid` - fi - rm $pid -fi -netcat -l -p 1706 -e "/usr/bin/feast .feast.conf" & -echo "$!" > $pid -trap "kill `cat $pid`" 2 15 diff --git a/misc/xgkrellm b/misc/xgkrellm deleted file mode 100755 index 857b85e..0000000 --- a/misc/xgkrellm +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# xgrellm: wrapper for gkrellm -# - -#gkreallm -w -gkrellm -g +945+545 diff --git a/misc/xterm b/misc/xterm deleted file mode 100755 index baebbce..0000000 --- a/misc/xterm +++ /dev/null @@ -1 +0,0 @@ -xterm -bg black -fg white -font -misc-fixed-bold-*-*-*-*-*-*-*-*-*-*-* -- cgit v1.2.3