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 | |
# Requirements: | |
# Ruby1.9 | |
# gem 'ansi' | |
# gem 'text_layout' | |
# diff | |
# diffstat | |
require 'shellwords' |
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
class Fixnum | |
def **(n) | |
self..n | |
end | |
end | |
class Range | |
def %(step) | |
self.step(step) | |
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
operator entry() { | |
Scalar array[]; | |
for (Size i = 0; i < 1000000; i++) { | |
array.push(1); | |
array.push(0); | |
array.push(2); | |
array.push(3); | |
array.push(1); | |
array.push(5); | |
} |
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
; ModuleID = '-' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" | |
target triple = "x86_64-apple-macosx10.7.3" | |
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind uwtable ssp { | |
%1 = call i32 @putchar(i32 72) nounwind | |
%2 = call i32 @putchar(i32 101) nounwind | |
%3 = call i32 @putchar(i32 108) nounwind | |
%4 = call i32 @putchar(i32 108) nounwind | |
%5 = call i32 @putchar(i32 111) nounwind |
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 | |
# -*- coding: UTF-8 -*-; | |
require 'thread' | |
require 'time' | |
class App | |
Bus = Struct.new :draw, :visualize | |
Info = Struct.new :title, :text |
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 <stdio.h> | |
typedef union { | |
double d; | |
int i; | |
} union_t; | |
void dump_union(union_t u) { | |
unsigned char *c = (unsigned char *)&u; |
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
require 'ffi' | |
module Union | |
extend ::FFI::Library | |
ffi_lib 'union' | |
class U < FFI::Union | |
layout( | |
:d, :double, | |
:i, :int |
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
require 'ffi' | |
module FFI::MRuby | |
extend ::FFI::Library | |
ffi_lib 'ritevm' | |
enum :mrb_vtype, [ | |
:FALSE, :FREE, :TRUE, :FIXNUM, | |
:SYMBOL, :UNDEF, :FLOAT, :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
diff: 2100 | |
*path*: 120 | |
.: 75 | |
--help: 19 | |
-p: 15 | |
-w: 14 | |
--no-color: 3 | |
--: 14 | |
*path*: 10 | |
--no-color: 13 |
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/osascript | |
tell application "Terminal" | |
contents of selected tab of front window | |
end tell |