I hereby claim:
- I am christo on github.
- I am christo (https://keybase.io/christo) on keybase.
- I have a public key whose fingerprint is F3D2 EE98 1CA2 521D 6532 A44E 8A98 0E10 FE38 1E8E
To claim this, I am signing this object:
#!/usr/bin/env groovy | |
import javax.sound.midi.* | |
def synth = MidiSystem.getSynthesizer() | |
synth.open() | |
def channel = synth.getChannels()[9] | |
// midi note for cowbell is 56 | |
channel.noteOn(56, 96) | |
Thread.sleep(100) |
#!/usr/bin/perl | |
use warnings; | |
open FH, $ARGV[0] or die; | |
@lines = <FH>; | |
print @lines[int(rand(scalar @lines))] . "\n"; | |
close FH; |
// Strong | |
console.log 40 + 2 | |
// Won't compile: | |
// console.log "40" + 2 | |
// Explicit | |
let f x: Number = x | |
console.log (f 100) |
def xml = new XmlSlurper().parse(System.in) | |
["Issue","Project","CustomField","User","Workflow","Action"].each{ | |
println "${it}s: ${xml[it].size()}" | |
} |
// you can make a construct for those | |
// times you want to ignore exceptions: | |
// here's the closure that can ignore things | |
def ignoring = { Class<? extends Throwable> catchMe, Closure callMe -> | |
try { | |
callMe.call() | |
} catch(e) { | |
if (!e.class.isAssignableFrom(catchMe)) { | |
throw e |
class Config { | |
def threads = 8 | |
// ... | |
def configure(Map config) { | |
try { | |
threads = Integer.parseInt(config?.threads as String) | |
} catch (NumberFormatException ignore) { |
I hereby claim:
To claim this, I am signing this object:
@font-face { | |
font-family: 'Montserrat'; | |
font-style: normal; | |
font-weight: normal; | |
src: local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v13/JTUSjIg1_i6t8kCHKm459WlhyyTh89Y.woff2) format('woff2'); | |
} | |
@font-face { | |
font-family: 'Montserrat'; | |
font-style: italic; | |
font-weight: normal; |
var scanx = 0; | |
var amp; | |
var cy; | |
var cx; | |
function setup() { | |
createCanvas(800, 800); | |
background(100); | |
reset(); | |
} |
#!/usr/bin/env bash | |
# for me generated example passes but modified example fails | |
testdir="$(date +%s)-test" | |
function check() { | |
if !(cabal build && site rebuild && site check); then | |
popd; echo; echo failed on $1; exit 1 | |
else | |
echo; echo success on $1 |