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
| app = lambda { |env| [200, { 'Content-Type' => 'text/html' }, 'Hello, world'] } | |
| run app |
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
| import tornado.httpserver | |
| import tornado.ioloop | |
| import tornado.web | |
| class MainHandler(tornado.web.RequestHandler): | |
| def get(self): | |
| self.write("Hello, world") | |
| application = tornado.web.Application([ | |
| (r"/", MainHandler), |
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 twisted.web import resource, server | |
| from twisted.internet import reactor | |
| import sys | |
| class RootResource(resource.Resource): | |
| def render_GET(self, request): | |
| return "Hello, world" |
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/ruby | |
| require 'yaml' | |
| require 'logger' | |
| require 'rubygems' | |
| require 'net/sftp' | |
| APP = '/path/to/your/rails/app' | |
| LOG_FILE = '/home/log/database.log' | |
| TIMESTAMP = '%Y%m%d%H%M%S' |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.username.customizedgrowl</string> | |
| <key>Program</key> | |
| <string>/usr/local/bin/twitter</string> | |
| <key>LowPriorityIO</key> | |
| <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
| #!/usr/bin/env ruby | |
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'rufus/verbs' # gem rufus-verbs | |
| require 'json' # gem json or json_pure | |
| require 'growl' # gem growlnotifier (and rubycocoa) | |
| def get_password key |
NewerOlder