Skip to content

Instantly share code, notes, and snippets.

class Pastie
# Paste source code to pasite.org
#
# Required arguments
# source : the source code
#
# Optional arguments
# format : file format for syntax highlighting (defualt: txt)
# private : post a private pastie (default: false)
class Card
ROYALS = [:jack, :queen, :king, :ace]
def initialize(value)
@value = if value.class == Symbol then
raise RuntimeError unless ROYALS.index(value) >= 0
ROYALS.index(value) + 11
else
val = value.to_i
raise RuntimeError unless val > 1 && val < 15
jQuery.noConflict();
require("spec_helper.js");
require("../../public/javascripts/prototype.js", {onload: function() {
require("../../public/javascripts/application.js");
require("../../public/javascripts/rdm/time_block.js");
}});
describe 'TimeBlock'
before_each
%%
spec
: prefix top_description_list EOF
;
prefix
: PREFIX
{print('prefix',yytext);}
|
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Test parser from web</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="calc.js"></script>
<script>
$(function () {
$("button").click(function () {
var result = calc.parse($("input").val())
@zaach
zaach / gist:221544
Created October 29, 2009 15:58 — forked from teeler/gist:205407
(* a simple echo server in ocaml
* -----------------------------
* uses a high level networking function, similar to SocketServer
* in python, called 'establish_server', see here:
* http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html#VALestablish_server
*)
(*
our echo function
in -> out -> unit
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
require 'socket'
@socket =IO.popen('nc pwn2.ddtek.biz 11511', 'w+')
@socket.print('MAZE4J002PLAY')
@socket.gets
@socket.gets
UP = 'n'
content narwhal-xpc content/
resource narwhal-xpc resources/
content narwhal narwhal/
skin narwhal-xpc classic/1.0 skin/classic/
Rocket Noodles
Rice noodles (or ramen noodles)
Chili garlic sauce (use sparingly, it's really hot)
Srirache hot chili sauce
Vegetariai mushroom oyster sauce
Onion
Dash of sugar
Oil