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
for f in `find . -type f -regextype awk -regex ".*/*.(xml|java)"`; do sed -i -e "s/foo/bar/g" $f; 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 | |
mkdir mygists | |
cd mygists | |
curl -u "gerjantd" https://api.github.com/gists | json_xs > mygists.json | |
cat mygists.json | grep "\"id\"" | awk -F "\"" '{print $4}' > repos | |
for g in `cat repos`; do git clone [email protected]:$g.git gist-$g; 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
"""List manually installed debian packages | |
Use as root or with sudo: | |
python list_manually_installed_packages.py [date] | |
output results to /var/log/manually_installed_software_<hostname>.csv | |
Optional argument [date] will list only packages installed since that date. | |
The date format is YYYYMMDD and be used e.g. as |
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 sys | |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
HandlerClass = SimpleHTTPRequestHandler | |
ServerClass = BaseHTTPServer.HTTPServer | |
Protocol = "HTTP/1.0" | |
if sys.argv[1:]: | |
port = int(sys.argv[1]) |
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
watch -n 8 "cat /etc/issue | grep '[a-z]'; uname -a; top -b -n 1 | head -1; who" |
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
Download | |
-------- | |
svn co https://src.springframework.org/svn/spring-samples/task-basic/trunk | |
(http://blog.springsource.org/2010/01/05/task-scheduling-simplifications-in-spring-3-0/) | |
Build | |
----- | |
mvn clean package |
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
If you accidentally combine multiple changes into one commit, here's how to split it. You will need this if you wish to merge the changes seperately; cherry-pick operates on commits. | |
admin@STAMMETJEVM ~/My Documents/git/gerjantd | |
$ git clone https://[email protected]/gerjantd/foo.git | |
Cloning into 'foo'... | |
remote: Counting objects: 301, done. | |
remote: Compressing objects: 100% (178/178), done. | |
remote: Total 301 (delta 59), reused 301 (delta 59) | |
Receiving objects: 100% (301/301), 152.94 KiB, done. | |
Resolving deltas: 100% (59/59), 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
To change this | |
vraag1.info | |
vraag2.info | |
vraag3a.info | |
vraag3b.info | |
into this | |
question.info.1 |
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
wget -O `date +%Y%m%d`-gerjantd-public-gists.json http://gist.github.com/api/v1/json/gists/gerjantd | |
Format the downloaded json: | |
sudo apt-get install libjson-perl | |
sudo apt-get install curl | |
curl http://gist.github.com/api/v1/json/gists/gerjantd | json_xs | |
Automate cloning of all gists: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- This is the DTD for DWR v2.x --> | |
<!-- | |
Top level conviguration element. | |
--> | |
<!ELEMENT dwr ( | |
(init?), (allow?), (signatures?) | |
)> |