- put
test.sh
into a folder andcd
into the folder. - put
jruby-complete-1.7.0.preview2.jar
into same folder, or tweakJRUBY
var to point to where it lives. - run it with
bash test.sh
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
const std = @import("std"); | |
const fs = std.fs; | |
const time = std.time; | |
pub const io_mode = .evented; | |
fn portReader(r: fs.File.Reader) !void { | |
var buf = [_]u8{0} ** 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
const std = @import("std"); | |
// Proving to myself the struct should be 14 bytes | |
// #include <stdio.h> | |
// #include <stdint.h> | |
// // /** Never change this, only on major IPC breakage (don’t do that) */ | |
// #define I3_IPC_MAGIC "i3-ipc" | |
// typedef struct i3_ipc_header { |
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
#!/bin/bash | |
# | |
# The Stanley Parable Launcher | |
# | |
# adapted by @mungler to use an embedded copy of the stanley parable game data | |
# adapted by @lachie to work with black mesa | |
# if this is not defined (default), the script will attempt to guess it | |
STEAMUSERID="" | |
# if your Steam application is somewhere other than /Applications, edit below. |
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
root@vagrant-ubuntu-raring-64:~# docker history ruby | |
IMAGE CREATED CREATED BY SIZE | |
4107806800c0 2 hours ago /bin/sh -c #(nop) ENV LC_ALL=en_US.UTF-8 939.1 MB | |
49a2ee12e428 2 hours ago /bin/sh -c #(nop) ENV LANG=en_US.UTF-8 939.1 MB | |
b61f43bef780 2 hours ago /bin/sh -c cd /blake-install && bash scripts/ 56.32 MB | |
99a4d0763187 2 hours ago /bin/sh -c cd /blake-install && bash scripts/ 384.1 MB | |
1b493dea067d 2 hours ago /bin/sh -c cd /blake-install && bash scripts/ 160.7 MB | |
7c0811d7a569 2 hours ago /bin/sh -c cd /blake-install && bash scripts/ 147.5 MB | |
869e4754b0ae 2 hours ago /bin/sh -c #(nop) ADD . in /blake-install 104.7 MB | |
764448da7565 2 hours ago /bin/sh -c sed 's/main$/main universe/' -i /e 199.8 MB |
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
# http://www.columbia.edu/~fms5/ult03.htm | |
# first 2 paragraphs of Proteus, from Ulysses | |
corpus = "Ineluctable modality of the visible: at least that if no more, thought through my eyes. Signatures of all things I am here to read, seaspawn and seawrack, the nearing tide, that rusty boot. Snotgreen, bluesilver, rust: coloured signs. Limits of the diaphane. But he adds: in bodies. Then he was aware of them bodies before of them coloured. How? By knocking his sconce against them, sure. Go easy. Bald he was and a millionaire, maestro di color che sanno. Limit of the diaphane in. Why in? Diaphane, adiaphane. If you can put your five fingers through it it is a gate, if not a door. Shut your eyes and see. Stephen closed his eyes to hear his boots crush crackling wrack and shells. You are walking through it howsomever. I am, a stride at a time. A very short space of time through very short times of space. Five, six: the Nacheinander. Exactly: and that is the ineluctable modality of the audible. Open your eyes. No. J |
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
# Check last queen for conflict | |
def conflict(p) | |
i_last = p.length-1 | |
(0..i_last-1).any? {|i| | |
p[i] == p[-1] || # conflict on col | |
i-p[i] == i_last-p[i_last] || # conflict on diag | |
i+p[i] == i_last+p[i_last] # conflict on other diag | |
} | |
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
define [ | |
"easel_filters" | |
], ({ColourFilter}) -> | |
# split hex colour into r,g,b | |
# | |
# Usage: | |
# hex2rgb 0xff0000 # => [255, 0, 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
define [ | |
"easel" | |
"easel_filters" | |
], ({}, {ColourFilter}) -> | |
# tint helper | |
# pass in r,g,b or a HEX value | |
# HEX value in this form: 0xFFFFFF |
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
# gup and friends | |
function git_current_branch() { | |
git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///' | |
} | |
alias grb='git rebase -p' | |
alias gup_base='git fetch origin && grb origin/$(git_current_branch)' |
NewerOlder