This file contains hidden or 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
| alura % /tmp/thing.pl | |
| text=/tmp | |
| RC=0. | |
| alura % |
This file contains hidden or 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 'test/unit' | |
| require 'varnish/test' | |
| require 'threading' | |
| # initializer | |
| # | |
| q_in = Threading::Queue.new | |
| q_out = Threading::Queue.new | |
| thread = Thread.new do |q| |
This file contains hidden or 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 File.expand_path("../../test_helper", __FILE__) | |
| class HelloWorldTest < Test::Unit::TestCase | |
| def test_it_says_hello_world | |
| expect :get, "/hello", "body goes here", { "X-Someheader" => "value" } do |response| | |
| # Assertions about response go here | |
| assert_equal response.body, "body goes here" | |
| end | |
| end | |
| end |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| $:.push File.expand_path("../lib", __FILE__) | |
| require "twat" | |
| Gem::Specification.new do |s| | |
| s.summary = "Command line tool for tweeting and whatnot" | |
| s.description = s.summary | |
| s.add_dependency "twitter" | |
| s.add_dependency "oauth" |
This file contains hidden or 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 csi -s | |
| ; Shitty irc bot, for the lulz | |
| ; | |
| ; Chicken internals | |
| (use posix) | |
| ; Externals | |
| (use openssl) | |
| ; Devious internals | |
| (require "lib/irc_internals") |
This file contains hidden or 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
| ; Credit http://en.wikipedia.org/wiki/Continuation | |
| ;;; A naive queue for thread scheduling. | |
| ;;; It holds a list of continuations "waiting to run". | |
| (define *queue* '()) | |
| (define (empty-queue?) | |
| (null? *queue*)) | |
| (define (enqueue x) |
This file contains hidden or 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 (mything arg) -> | |
| if arg | |
| (print "true") | |
| (print "false") | |
| ; Compiles to | |
| (define (mything arg) | |
| (if arg | |
| (print "true") |
This file contains hidden or 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 CachyThing | |
| def intitialize | |
| @_items = {} | |
| end | |
| def method_missing(sym) | |
| # TODO Catch setters | |
| if @_items.include? sym | |
| @_items[sym] | |
| else |
This file contains hidden or 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 Object; extend Base; include Base; end |
This file contains hidden or 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
| [0x8549c60] call_user_func(object[0x85b5970], object[0x2d95218]) /home/ubuntu/contests/lib/ergo/classes/Ergo/Registry.php:31 | |
| [0x8549af0] lookup("db", NULL) /home/ubuntu/contests/lib/ergo/classes/Ergo/Application.php:165 | |
| [0x7fff615ba480] lookup("db") | |
| [0x8549970] call_user_func_array(array(2)[0x85b6228], array(1)[0x85b6300]) /home/ubuntu/contests/lib/ergo/classes/Ergo.php:86 | |
| [0x7fff615ba7a0] __callStatic("lookup", array(1)[0x85b6118]) | |
| [0x8549700] lookup("db") /home/ubuntu/contests/tests/helpers/Contests/Testing/LazyDatabaseConnection.php:23 | |
| [0x7fff615baba0] createConnection("pheasant://contests:contests@localhost:3306/conteststest_cli4fd7310a186a2?new") | |
| [0x8548d00] call_user_func(array(2)[0x2d9bc30], "pheasant://contests:contests@localhost:3306/conteststest_cli4fd7310a186a2?new") /home/ubuntu/contests/classes/Gazelle/Db/ConnectionPool.php:80 | |
| [0x8548b30] getConnection("writer") /home/ubuntu/contests/classes/Gazelle/Db/LoadBalancedDatabase.php:144 | |
| [0x8548960] _getConnection("writer") /home/ubuntu/contest |