Skip to content

Instantly share code, notes, and snippets.

phiresky

Block or report user

Report or block phiresky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@phiresky
phiresky / compiled
Last active Oct 22, 2017
export ICS file from KIT Webinscribe. paste into web console
View compiled
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();
View ani.py
# This script was generated by SVP 4 Manager.
# Check https://www.svp-team.com for more details.
import vapoursynth as vs
core = vs.get_core(threads=9)
core.std.LoadPlugin("/opt/svp/plugins/libsvpflow1_vs64.so")
core.std.LoadPlugin("/opt/svp/plugins/libsvpflow2_vs64.so")
clip = video_in
@phiresky
phiresky / .gitignore
Last active May 22, 2017
sha256 mining
View .gitignore
latestinfo
sha256test
callgrind*
sha256test.gcda
@phiresky
phiresky / place.md
Last active Apr 2, 2017
reddit.com/r/place links
View place.md

link collection

subreddits

  • /r/thebluecorner

...

timelapse, history

View pulsgraph.py
#!/usr/bin/python3
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import numpy, csv, sys
from itertools import groupby
from functools import partial
reader = csv.reader(open("data.csv", "r"), delimiter=";")
next(reader, None) # skip header
@phiresky
phiresky / test.md
Last active Feb 21, 2016
unicode RTL test
View test.md

is this really an opening brace? ‮"}"

‮.erehwemos ti gnitsap dna "god yzal eht revo spmuj xof nworb kciuq ehT" :siht ypoc ot yrT‭

@phiresky
phiresky / copy-from-time-machine.sh
Last active Jan 1, 2016 — forked from vjt/copy-from-time-machine.sh
Copy data from a Time Machine volume mounted on a Linux box. made compatible with non-english system languages
View copy-from-time-machine.sh
#!/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.
#
View binarySearchStorageCapacity.html
<script>
function log(s) {
document.writeln(s+"<br>");
console.log(s);
}
function generateString(bytes) {
return Array(bytes+1).join("a");
}
@phiresky
phiresky / gist:f651244ca61568b9a19a
Last active Aug 29, 2015
hash collision probability test
View gist:f651244ca61568b9a19a
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) {
@phiresky
phiresky / downloadChannel.sh
Last active Aug 29, 2015
Download / Parse MrSuicideSheep Youtube Channel
View downloadChannel.sh
#!/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"
You can’t perform that action at this time.