This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for doc in ./*.JPG; do | |
convert $doc -resize 50% $doc; | |
echo "Done with" $doc; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for doc in ./*.pdf; do | |
convert -units PixelsPerInch -density 150 -type Grayscale -depth 4 -monochrome -compress LZW $doc $doc.tif; | |
echo 'Done with' $doc; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList | |
for I in `cat /tmp/kernelList` | |
do | |
aptitude remove $I | |
done | |
rm -f /tmp/kernelList | |
update-grub | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulimit -c unlimited | |
echo 'core_%e.%t.%p' > /proc/sys/kernel/core_pattern |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mysqldump --all-databases --user="username" --password="password" --single-transaction >/destination/folder/all_databases.sql | |
cd /destination/folder/ | |
# Create new archive | |
ARCHIVE_NAME=DBs$(date '+%G%m%d%k').tar | |
tar -cvvf $ARCHIVE_NAME all_databases.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]$\[\033[00m\] " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Pre-commit hook to make a mysql dump right before committing and add it to the commit. | |
# | |
## Change the following values to suit your local setup. | |
# The name of a database user with read access to the database. | |
DBUSER=root | |
# The password associated with the above user. Leave commented if none. | |
DBPASS=seekrit | |
# The database associated with this repository. | |
DBNAME=dplay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import encodings.idna | |
filename = '/path/to/names'; | |
filePointer = open(filename,'r'); | |
content = filePointer.read(); | |
content = content.split("\n"); | |
for line in content: | |
line = line.decode('utf-8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def generateChars(char): | |
if char == u'\u03ac' or char == u'\u03b1': #alpha | |
return (u'\u03ac',u'\u03b1'); | |
elif char == u'\u03b5' or char == u'\u03ad': #epsilon | |
return (u'\u03b5', u'\u03ad'); | |
elif char == u'\u03b7' or char == u'\u03ae': #ita | |
return (u'\u03b7',u'\u03ae'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for line in $(rospack list-names) | |
do | |
for msg in $(rosmsg package $line) | |
do | |
echo 'Message ' $msg ' in ' $line | |
rosmsg show $msg | |
echo '-----------------------------------------------------' | |
done | |
OlderNewer