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
second = 1; | |
year = 365.25 * 24 * 60 * 60 * second; | |
universe_age = 13.82e9 * year; | |
hash_length = 256; | |
hash_speed = 2500 * 1e6 / second; // fastest GPU from https://en.bitcoin.it/wiki/Non-specialized_hardware_comparison | |
probability_of_asteroid_wiping_out_humans = 1 / (100 * 1e6 * year); // http://www.wired.com/2013/02/asteroid-odds/ | |
// http://preshing.com/20110504/hash-collision-probabilities/ | |
function collision_probability(tries, possibilities) { |
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 | |
# downloadChannel | |
# | |
# downloads a whole youtube channel, including descriptions and thumbnails | |
# should work on any channel or playlist | |
# youtube-dl is awesome | |
# depends: youtube-dl | |
if [[ ! "$1" ]]; then | |
echo "No channel specified" |
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
{ | |
"help": "{n} is replaced with the sheet number, n represents the padding of the number e.g. ({2} => (01,02,03))", | |
"name": "KIT Inf SS2015 (4. FSem)", | |
"uebs": { | |
"Sicherheit": { | |
"begin": "2015-04-23 15:45", | |
"every": [14,21,14], | |
"url": "https://crypto.iti.kit.edu/fileadmin/User/SicherheitSS15/Uebung/Sicherheit_UE{2}.pdf", | |
"info": "Keine Abgabe. Besprechung in der Übung. <a href='https://crypto.iti.kit.edu/index.php?id=sic-sose15'>Vorlesungsseite</a>" | |
}, |
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
{ | |
"name": "KIT Inf WS2014", | |
"uebs": { | |
"DT": { | |
"begin": "2014-11-03 13:00", | |
"every": 7, | |
"url": "http://ti.ira.uka.de/TI-2/Uebungen/blatt{2}.pdf" | |
} | |
}, | |
"end": "2015-02-15" |
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
{ | |
"help": "{n} is replaced with the sheet number, n represents the padding of the number e.g. ({2} => (01,02,03))", | |
"name": "KIT Inf SS2014", | |
"uebs": { | |
"RO": { | |
"begin": "2014-04-28 13:15", | |
"every": 7, | |
"url": "http://ti.ira.uka.de/TI-2/Uebungen/blatt{2}.pdf", | |
"info": "Keine Pflicht aber Bonuspunkte auf die Klausur" | |
}, |
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
var a="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//phiresky.de//tools\n",b=$("table.piTable>tbody").children; | |
for(i=0;i<b.length;i++)var c=b[i].children,d=c[0].textContent.trim(),e=c[1].textContent,f=/Tutorium (..) ([-0-9:]+) (.*)/.exec(c[2].textContent.trim()),g=f[1],h=f[2],k=f[3],g=["Mo","Di","Mi","Do","Fr"].indexOf(g),h=/(..):(..)-(..):(..)/.exec(h),l="201410"+(27+g)+"T"+h[1]+h[2]+"00",m="201410"+(27+g)+"T"+h[3]+h[4]+"00",a=a+("BEGIN:VEVENT\nLOCATION:"+k+"\nSUMMARY:Tutorium für "+d.replace(/,/g,"\\,")+"\nDESCRIPTION:"+e+"\nDTSTART:"+l+"\nDTEND:"+m+"\nRRULE:FREQ=WEEKLY;COUNT=16\nEND:VEVENT\n"); | |
var a=a+"END:VCALENDAR\n",n=document.body.appendChild(document.createElement("a"));n.href=URL.createObjectURL(new Blob([a],{type:"text/calendar"}));n.download="Tutorien WS2014 "+$("h3").textContent.match(/.{6}(.*)/)[1]+".ics";n.click(); |
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 | |
# | |
# Copy data from a Time Machine volume mounted on a Linux box. | |
# | |
# Usage: copy-from-time-machine.sh <source> <target> | |
# | |
# source: the source directory inside a time machine backup | |
# target: the target directory in which to copy the reconstructed | |
# directory trees. Created if it does not exists. | |
# |
NewerOlder