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
<?php | |
require 'vendor/autoload.php'; | |
$template = <<<"HTML" | |
<dl> | |
{{#def "Wello horld"}} | |
Hello {{who}} | |
{{/def}} | |
</dl> |
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
// Generated by CoffeeScript 1.8.0 | |
var Handlebars, source, template; | |
Handlebars = require('handlebars'); | |
Handlebars.registerHelper('def', function(title, options) { | |
return '<dt>' + title + '</dt><dd>' + options.fn(this) + '</dd>'; | |
}); | |
source = '<dl>{{#def \'Wello\'}}Hello {{who}}{{/def}}</dl>'; |
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
<?php | |
require('vendor/autoload.php'); | |
$tmpfile = tempnam(sys_get_temp_dir(), 'hbs'); | |
error_log($tmpfile); | |
$tmpl_src = <<<'HBS' | |
{{{test foo="bar"}}} | |
HBS; | |
$tmpl = LightnCandy::compile($tmpl_src, Array( |
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 2 | |
3 | |
end | |
puts 2 + 2 |
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 <ctype.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <limits.h> | |
#define PASSWORD_LENGTH 10 | |
int main(void) { |
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
OPEN_SYMBOL="❮" | |
CLOSE_SYMBOL="❯" | |
PROMPT=" %F{cyan}%m: %B%n%b%F{cyan} \${CLOSE_SYMBOL}%f " | |
RPROMPT="\${STATUS_PROMPT}%F{blue}\${OPEN_SYMBOL} %B%1~%b%f" | |
LAST_RET=0 | |
setopt PROMPT_SUBST | |
setopt TRANSIENT_RPROMPT |
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 false.to_s | |
"true" | |
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
adaedra@pegasus % cd /tmp | |
adaedra@pegasus % echo "int main(void) { }" > memory_fail.c | |
adaedra@pegasus % gcc -o memory_fail memory_fail.c | |
adaedra@pegasus % valgrind ./memory_fail | |
==2086== Memcheck, a memory error detector | |
==2086== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. | |
==2086== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info | |
==2086== Command: ./memory_fail | |
==2086== | |
==2086== WARNING: Support on MacOS 10.8 is experimental and mostly broken. |
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
adaedra@pegasus % ./test.rb | |
Test "sinusTest" runned in 1.340s | |
Test "loopTest" runned in 6.249s | |
Test "arrayTest" runned in 1.810s | |
Test "randomTest" runned in 3.110s | |
Test "sortTest" runned in 1.774s | |
Test "threadsTest" runned in 5.762s | |
Total time run : 20.045s | |
adaedra@pegasus % rvm use jruby | |
Using /usr/local/rvm/gems/jruby-1.6.8 |