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
% irb | |
>> struct = Struct.new('Fabulous', :name, :id) | |
=> Struct::Fabulous | |
>> struct | |
=> Struct::Fabulous | |
>> class Foo < Struct::Fabulous | |
>> end | |
=> nil | |
>> f = Foo.new | |
=> #<struct Foo name=nil, id=nil> |
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/perl | |
# | |
# Sorts the output of du -h | |
use strict; | |
my $multip = { | |
'G' => 1024*1024*1024, | |
'M' => 1024*1024, | |
'K' => 1024, |
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
try { | |
x = you.getKnife().getRun().getCut(); | |
} catch (NullPointerException e) { | |
x = null; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Just the latest tweet</title> | |
</head> | |
<body> | |
<script> | |
// From http://twitter.com/javascripts/blogger.js | |
function tweettweet(twitters) { | |
var statusHTML = []; |
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
python -m SimpleHTTPServer |
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
cat > data.csv <<HERE | |
4 | |
5 | |
6 | |
7.9 | |
HERE | |
r --slave -e 'summary(scan(file="data.csv"))' | |
## Results in: |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAluyWosEaMkwlFy/hmxmCRjKLEiiQTvNRT6zz7wPD7FHssAj4xVEi/yNGdHJeHZbqYtOvEn238OC7qUxYh7MtseRkrbgfPraUs4B51S9+9wNZ8wd7LXfLhhsHl8836FmONt+0LCwu4TeOX+3sW4algXuv2sNKQ7Ki+DGGVReA1V84TTch2beluh5aI6QPJ/WK/HOzD+GzN6zEmvn94AZdx3HaUBw/eqML72Hk9r6E5EV2HChQz4HBLabi3l8ijfk9B6kVpp/bVCiZIIVec6cbI0Utc3wHfmZWFMpD/Shok2PdYHc6Yclj8teg89jA4/cU8dFk1ahyQwZqGdZrXRst5Q== tushar@flake.local |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKzQE/X7FYxaGtZ8QXszU1FYNX+YPs5dFiecN3TN48lsXGu/O+9S3DD/0gT3nHTOH9+/MjHFRu4VRCmNUAgfCZIz4wRWiBcGE06AZEMIfriDeci0CI24q79/JN8sNzFpa8JihbaAKHckAOy1TW4qMOTLfoEbc2c5GJ3JLtc2Yh9hH2thyMXXSqKaGPpscYinLLg4lBD6Ui6sMHN1u7mxnN6X6+4cIhzZuqnhjRL12K72ccwHbQlDeW0kDVrgKWpwl+5ou7BxBMKC/oj+Hg2nq9xk1Vp8dSc4o+VSqrRAja63wYp+80JO2dRL4uWYFwuIdAX92wjWVbTkvVXMPlLAxh poklet@tushmac.local |
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
// | |
// Copy this into your Jenkins Build Flow plugin DSL, and call run_workspace_script() with the name of your checked in script | |
// | |
// Based on code at http://jorgemanrubia.net/2009/10/10/evaluating-code-dynamically-in-groovy | |
// | |
def run_workspace_script(filename) { | |
def code = new File(build.workspace.child(filename).toString()).text | |
def code_as_closure = "{->${code}}" | |
def closure = evaluate(code_as_closure) | |
closure.delegate=this |
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 bash | |
usermod -aG docker ubuntu | |
echo 'DOCKER_OPTS="-H tcp://0.0.0.0:4243/"' >> /etc/default/docker |
OlderNewer