Skip to content

Instantly share code, notes, and snippets.

@shellac
shellac / mtr.out
Last active November 18, 2016 12:10
mtr output
> mtr -rw 72.14.191.203
Start: Fri Nov 18 12:09:15 2016
HOST: it061813 Loss% Snt Last Avg Best Wrst StDev
1.|-- ccr1-s34.nwgw.bris.ac.uk 0.0% 10 10.7 1.8 0.7 10.7 3.1
2.|-- br4-ccr1.nwpp.bris.ac.uk 0.0% 10 0.4 1.2 0.3 9.0 2.6
3.|-- br4-fr2-academic.nwpp.bris.ac.uk 0.0% 10 0.8 0.7 0.7 0.8 0.0
4.|-- gr2-fr2.nwpp.bris.ac.uk 0.0% 10 1.2 1.3 1.2 1.6 0.0
5.|-- xe-0-3-0.brisub-rbr1.ja.net 0.0% 10 1.0 1.1 1.0 1.5 0.0
6.|-- ae1.briswe-rbr1.ja.net 0.0% 10 1.3 1.3 1.2 1.7 0.0
7.|-- ae22.londpg-sbr2.ja.net 0.0% 10 4.0 4.1 3.7 5.3 0.3
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="0" time="5.444" errors="2" skipped="0" tests="2" name="uk.ac.ox.it.ords.api.database.resources.DatabaseTest">
<properties>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="sun.boot.library.path" value="/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64"/>
<property name="java.vm.version" value="24.95-b01"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=":"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
@shellac
shellac / df-out-mac
Created July 24, 2015 12:52
df output on mac
$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487849984 409442400 77895584 85% 51244298 9736948 84% /
devfs 382 382 0 100% 662 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
localhost:/wJehW-9zBUWN7G4CfiRtVu 487849984 487849984 0 100% 0 0 100% /Volumes/MobileBackups
(0) pldms@vpn-user-248-046:~
$ df -P
Filesystem 512-blocks Used Available Capacity Mounted on
@shellac
shellac / results
Created June 20, 2014 16:48
Scala benchmark results
Before
Benchmark Mode Samples Mean Mean error Units
cartBaseline avgt 10 8.188 0.067 ms/op
cartPar avgt 10 6076.148 559.259 ms/op
cartParOpt avgt 10 483.091 11.921 ms/op
cartSeq avgt 10 320.620 9.380 ms/op
cartSeqOpt avgt 10 369.548 14.823 ms/op
sumBaseline avgt 10 16.852 4.273 ms/op
sumOfSquaresBaseline avgt 10 14.663 0.569 ms/op
SELECT ?t (count(distinct ?c) AS ?num)
WHERE
{ ?t rdfs:comment ?c }
GROUP BY ?t
HAVING ( ?num > 1 )
use std::io::File;
use std::vec::Vec;
fn main() {
let p = Path::new("example.hgt");
let mut file = match File::open(&p) {
Ok(f) => f,
Err(e) => fail!("file error: {}", e)
# On the pi
$ raspivid -t 999999 -o - | nc 192.168.1.87 5001
# On the mac
$ nc -l 5001 | mplayer -fps 31 -cache 1024 -vf halfpack -
@shellac
shellac / annotation.html
Last active December 26, 2015 03:19
Attempt to explain how to fix RDFa example
<!DOCTYPE html>
<html version="HTML+RDFa 1.1"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:aa="http://activearchives.org/terms/">
SELECT DISTINCT ?Sensor0 ?LeftBoundary1 ?RightBoundary2 ?TopBoundary3 ?BottomBoundary4
WHERE {
{
?PathRow5 <http://toto/#bottomBoundary> ?BottomBoundary4 .
?PathRow5 <http://toto/#topBoundary> ?TopBoundary3 .
?PathRow5 <http://toto/#leftBoundary> ?LeftBoundary1 .
?PathRow5 <http://toto/#rightBoundary> ?RightBoundary2 .
?PathRow5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://toto/#PathRow> .
@shellac
shellac / Jsoup.java
Last active December 17, 2015 15:59
Issue with jsoup addClass -- leading empty class.
import java.util.Set;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
public class Jsoup {
public static void main(String... args) throws Exception {
Document html = Jsoup.parse("<html><body><p>Bye</p><p class=\"baz\">Hi</p></body></html>");