I hereby claim:
- I am pencil on github.
- I am user (https://keybase.io/user) on keybase.
- I have a public key whose fingerprint is 015F D8BF 7EB7 5A7C 3791 A258 63B9 F5D7 3BF3 4514
To claim this, I am signing this object:
// ==UserScript== | |
// @name GitHub: Set merge message to PR title and description | |
// @namespace https://github.com/pencil | |
// @version 0.6 | |
// @description Set the default GitHub merge title and description to the one of the PR itself. | |
// @author Nils Caspar | |
// @match https://github.com/* | |
// @icon https://github.githubassets.com/favicons/favicon.png | |
// @grant none | |
// @downloadURL https://gist.githubusercontent.com/pencil/51460c59d4c21e10e2d33f1a7208db04/raw/script.js |
I hereby claim:
To claim this, I am signing this object:
IEC_PREFIXES = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi'] | |
SI_PREFIXES = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'] | |
def human_readable_size(size, precision = 2, use_iec_prefix = false) | |
size = size.to_f | |
if use_iec_prefix | |
prefixes = IEC_PREFIXES | |
base = 1024 | |
else | |
prefixes = SI_PREFIXES | |
base = 1000 |
#!/usr/bin/env sh | |
if ! which md5sum > /dev/null; then | |
echo Install md5sum | |
exit 1 | |
fi | |
if ! which curl > /dev/null; then | |
echo Install curl | |
exit 1 |
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'optparse' | |
SOURCEDIR='/Volumes/root/skripte' | |
DESTDIR="/Users/#{ENV['USER']}/Dropbox/Documents/HSR/Semester5/skripte" | |
MAX_SIZE='20m' | |
Subject = Struct.new :source, :destination, :parameters |
public class RandomSort { | |
public RandomSort(int[] i) { | |
int counter = 0; | |
System.out.println("I'll sort " + i.length + " elements..."); | |
while (!isSorted(i)) { | |
shuffle(i); | |
counter++; | |
} | |
System.out.println("Solution found! (shuffled " + counter + " times)"); |