Skip to content

Instantly share code, notes, and snippets.

@nicokruger
nicokruger / fan.sh
Created October 14, 2011 13:35
Fan manipulation on HP EliteBook
echo -n 0 >> /proc/acpi/fan/FANG/state # turn it on
echo -n 3 >> /proc/acpi/fan/FANG/state # turn it off
@nicokruger
nicokruger / set-sdcard-installation.sh
Created October 25, 2011 12:17
Android: set adb to install to SD card
adb shell pm setInstallLocation 2
@nicokruger
nicokruger / serve-http.sh
Created October 26, 2011 08:17
One line python webserver
cd $DIR_TO_SERVE_FROM;
python -m SimpleHTTPServer
@nicokruger
nicokruger / hsql-manager.sh
Created November 2, 2011 10:52
Run built-in HSQL client
java -cp /home/nico.kruger/.m2/repository/org/hsqldb/hsqldb/2.1.0/hsqldb-2.1.0.jar org.hsqldb.util.DatabaseManagerSwing
# jdbc:hsqldb:hsql://localhost:9005/
@nicokruger
nicokruger / bl.sh
Created November 23, 2011 15:21
my crappy backlight
echo -n 24 > /sys/class/backlight/acpi_video0/brightness
@nicokruger
nicokruger / vmware.sh
Created February 1, 2012 05:41
vmware re-install modules
vmware-modconfig --console --install-all
@nicokruger
nicokruger / curl.sh
Created February 22, 2012 05:49
Curls
curl -d "username=c&password=c&email=c" http://localhost:8080/admin/add # post data
@nicokruger
nicokruger / bgtest-runner-mocha-libnotify.js
Created February 23, 2012 07:44
bgtest-runner-mocha-libnotify
var exec = require("child_process").exec,
spawn = require("child_process").spawn,
command = "mocha -R json tests/*-test.js",
_ = require("underscore");
var child = exec(command, function (error, stdout, stderr) {
var output, STATUS, ICON, status;
if (stderr) {
STATUS="BROKEN";
@nicokruger
nicokruger / Guardfile
Created February 23, 2012 07:45
Guardfile for auto test running
guard 'shell' do
watch(%r"tests/.*test\..*") {|m|
`node bgtests.js`
}
watch(%r"js/.*js") {|m|
`node bgtests.js`
}
end
@nicokruger
nicokruger / jenkins-jobcreate.py
Created February 23, 2012 13:53
jenkins-jobcreate
import tempfile
import os
import libxml2
RECIPIENTS="[email protected]"
for line in [x.strip() for x in open("projects.list").readlines()]:
GIT_URL = "git://git.rorotika/" + line
GROUP_ID = "A"
ARTIFACT_ID = "A"