visit('/projects')
visit(post_comments_path(post))
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
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)"); |
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/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 |
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/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 |
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
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 |
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:
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
// ==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 |