Skip to content

Instantly share code, notes, and snippets.

View jskripsky's full-sized avatar

Juraj Skripsky jskripsky

  • Zurich, Switzerland
View GitHub Profile
[color]
ui = auto
[user]
name = Juraj Skripsky\n
email = js@hotfeet.ch
[gui]
recentrepo = /home/js/legic/csw
[giggle]
main-window-maximized = false
main-window-geometry = 1344x816+149+118
@jskripsky
jskripsky / check-mail.sh
Created June 29, 2012 13:24
check form incoming mails for a particular address.
#!/bin/sh
grep -E "to=<(albert\.koeppel|ka)@(gup|gruenberg-partner)\.ch" /var/log/maillog >/tmp/gup-mail-log-mercury.log
@jskripsky
jskripsky / show-all-file-changes.sh
Created April 26, 2012 13:09
show all file additions, modifications, deletions and renames in repo.
#!/bin/sh
for commit in $(git log --pretty=format:%H); do git diff --name-status -M100 $commit~1 ${commit}; done
@jskripsky
jskripsky / list-all-rpm-sizes.sh
Created April 26, 2012 12:43
List all installed rpm packages and sizes.
#!/bin/sh
rpm -qa --queryformat="%10{SIZE}\t%{NAME}\n" | sort -k1,1n
@jskripsky
jskripsky / rsync_homedirs-exclude.lst
Created April 15, 2012 07:48
rsync: directories and files to exclude in home/*
.evolution
.thumbnails
.gftp/cache
.mozilla/firefox/*/Cache
.wapi
.wine
.ies4linux
.Trash
.ccache
@jskripsky
jskripsky / rsync-daily
Created April 8, 2012 16:41
Script for automated daily rsync-based backups (keeps last 7 days)
#!/bin/sh
### expects file "conf" with configuration
###
### example:
### src="root@mercury"
### dirs="/var /etc /root /home"
### excludes="/var/log/nagios/spool/checkresults/*"
log() {
@jskripsky
jskripsky / samples.ldif
Created December 21, 2011 13:11
LDIF samples
dn: dc=mail,dc=domain.ch,ou=hosting,o=hotfeet.ch
arecord: 0.0.0.0
associateddomain: mail.domain.ch
dc: mail
objectclass: dNSDomainExtended
objectclass: domainRelatedObject
dn: cn=Lisa Jangles,ou=People,dc=example,dc=com
changetype: modify
add: telephonenumber
@jskripsky
jskripsky / del-old-zoom-bundles.sh
Created December 5, 2011 17:09
fischer/schuler: delete old zoom bundles
for file in $(ls -t *.xml | tail -n 50); do dir=$(echo $file | sed -e "s/.xml/\//"); rm $file -f; rm $dir -rf; done
#list of files:
# for file in $(ls -t *.xml | tail -n 50); do ls -l $file; done | less
@jskripsky
jskripsky / remove-color-profile.sh
Created October 20, 2011 23:14
Remove color profiles, preserve everything else
gm mogrify -define jpeg:preserve-settings +profile "*"
@jskripsky
jskripsky / push-to-kindle.sh
Created October 19, 2011 14:18
Transfer multiple files to amazon for conversion and delivery on kindle
for file in *.doc; do echo $file; echo "" | mail -s "" -a "$file" -r [sender-addr] [name]@kindle.com; sleep 5; done