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
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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
| def main(): | |
| import os, time | |
| menu_selection = 0 | |
| while menu_selection != 5: | |
| clear_screen() | |
| mainmenu() | |
| if menu_selection == 1: | |
| clear_screen() | |
| print_instructions() | |
| elif menu_selection == 2: |
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
| from create import * | |
| from time import * | |
| import create | |
| robot = create.Create(3) | |
| def wait(): | |
| sleep(.5) | |
| def die(): |
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 python | |
| """ | |
| HTTP Link Header Parsing | |
| Simple routines to parse and manipulate Link headers. | |
| """ | |
| __license__ = """ | |
| Copyright (c) 2009 Mark Nottingham |
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
| # Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
| Hi everyone, I'm Chris Wanstrath. | |
| When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
| then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
| to say that's interesting? Something about Ruby, perhaps. Maybe the | |
| future of it. The future of something, at least. That sounds | |
| keynote-y. | |
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 'net/http' | |
| require 'uri' | |
| # /api/v1/:format/new | |
| # /api/v1/:format/gists/:user | |
| # /api/v1/:format/:gist_id | |
| res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
| { 'files[file1.ab]' => 'CONTNETS', | |
| 'files[file2.ab]' => 'contents' }) |
NewerOlder