Skip to content

Instantly share code, notes, and snippets.

View jminer's full-sized avatar

Jordan Miner jminer

View GitHub Profile
@jminer
jminer / syntax_test.rs
Last active October 24, 2015 20:11
An example to test Rust syntax highlighting
/**
* Doc comment
* 'just_a_comment and "unclosed quote
*/
/*
* normal comment
*/
@jminer
jminer / factorial
Last active August 29, 2015 14:05
Referring to function pointer in definition
-----
Dart
-----
main() {
var factorial = (n) {
if(n == 0)
return 1;
return n * factorial(n - 1);
};
import pegged.grammar;
import std.stdio;
import std.conv;
mixin(grammar(`
RubySource <- S Expr* End
Until(Expr) <~ (!Expr > .)* Expr
S <- Comment / :(Space / '\t' / EOL)
import pegged.grammar;
import std.stdio;
mixin(grammar(`
FloatLiteral <~ DecLiteral ('e' [+-]? ([0-9] [0-9]*))?
DecLiteral <- [0-9] [0-9]*
`));
void main() {
auto str = "3e2";
@jminer
jminer / sirb.rb
Created February 9, 2012 20:04
Simple interactive Ruby
$stdout.sync = true
while true
print "> "
p(eval gets)
end