This file contains 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
#Taken from http://lo-f.at/glahn/2008/01/PerlOneliners.html | |
perl -MXML::LibXML \ | |
-e 'print XML::LibXML->new->parse_file($ARGV[0])->toString(1);' \ | |
somefile.xml |
This file contains 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 static org.junit.Assert.*; | |
import static org.mockito.Matchers.*; | |
import static org.mockito.Mockito.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.junit.Test; | |
@Test |
This file contains 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 java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.StringWriter; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.commons.io.IOUtils; |
This file contains 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
function loadScripts(scripts, doneCallback) { | |
var i = 0; | |
var fn; | |
var fns = []; | |
var slist = []; | |
var load = function (s, h) { | |
console.log("Loading JS " + s); |
This file contains 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 | |
# Inspired by http://askubuntu.com/a/469040/99692 | |
sudo bash -c "echo 600 > /sys/class/backlight/intel_backlight/brightness" |
This file contains 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 | |
USER=$1 | |
PASSWORD=$2 | |
LOGIN_AJAX_SERVICE=$3 | |
if [ -z "$1" ]; then | |
echo "ERROR: USER REQUIRED (first parameter)"; | |
exit 1; | |
fi | |
if [ -z "$2" ]; then |
This file contains 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
(function () { | |
var log, global = (function () { | |
return this; | |
}).call(null); | |
var ready = false; | |
var check = function () { | |
if (!ready) { | |
init(); | |
} |
This file contains 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/sh | |
DEST=$1 | |
cvlc v4l2:///dev/video0 :input-slave=alsa://hw:3,0 --sout '#transcode{vcodec=h264,vb=400,venc=x264{profile=baseline},scale=Auto,width=480,height=352,acodec=mp2,ab=24,channels=2,samplerate=44100}:standard{mux=mp4, access=file, dst='$DEST'}' |
This file contains 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/perl | |
use strict; | |
use warnings; | |
use Net::Pcap; | |
use NetPacket::Ethernet qw(:types); | |
use NetPacket::IP qw(:protos); | |
use NetPacket::UDP; |
This file contains 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/sh | |
dvgrab --autosplit --timestamp video- |
OlderNewer