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
success = 0 | |
1000000.times {success += [0,1,2,3,4].zip([0,1,2,3,4].shuffle).select{|a,b| a==b}.size} | |
puts success.to_f/1000000 |
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
(defn fib [n] | |
(cond | |
(= 0 n) 1 | |
(= 1 n) 2 | |
:else (+ (fib (- n 2)) (fib (- n 1))) | |
) | |
) | |
(def fibmemo (memoize fib)) |
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
minute = ( | |
mounts % ( | |
24 * 60 * 60 | |
) | |
) % | |
( | |
60 * 60 | |
) / 60; |
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
#include <thread> | |
int main (int argc, char const *argv[]) | |
{ | |
std::thread([](){}); | |
return 0; | |
} |
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
--- Portfile 2014-05-19 10:15:44.000000000 +0200 | |
+++ Portfile.exr 2014-05-19 10:13:51.000000000 +0200 | |
@@ -157,6 +157,13 @@ | |
configure.args-replace --without-wmf --with-wmf | |
} | |
+variant exr description {Include support for EXR} { | |
+ depends_lib-append port:openexr \ | |
+ port:ilmbase | |
+ configure.args-replace --disable-hdri --enable-hdri |
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
def to_s | |
def to_s | |
"foo" | |
end | |
end |
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 'pp' | |
require 'spotify' | |
require 'io/console' | |
USERNAME='tliff' | |
PLAYLIST='spotify:user:1121758979:playlist:1ohNJvub3eoB86tKumCC7U' | |
CONFIG = Spotify::SessionConfig.new({ | |
api_version: Spotify::API_VERSION.to_i, | |
application_key: File.binread(File.expand_path("~/.spotify/spotify_appkey.key")), |
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
▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬ | |
DAMN THIS NEW SPAM IS FANCY | |
▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬ |
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
### Keybase proof | |
I hereby claim: | |
* I am tliff on github. | |
* I am tliff (https://keybase.io/tliff) on keybase. | |
* I have a public key whose fingerprint is EB1C BD17 E88A D86B 6692 9B91 9EF6 EC5C B14C EEB7 | |
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
Data: | |
etcdctl mkdir /vhosts | |
etcdctl mkdir /vhosts/foo | |
etcdctl mkdir /vhosts/foo/backends | |
etcdctl mkdir /vhosts/foo/hostnames | |
etcdctl set /vhosts/foo/backends/mybackend "192.168.0.1:8001" | |
etcdctl set /vhosts/foo/backends/myotherbackend "192.168.1.1:8001" | |
etcdctl set /vhosts/foo/hostnames/example "example.com" |
OlderNewer