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
| # download zip file | |
| source = open(feed_url, | |
| :content_length_proc => lambda { |t| | |
| start = Time.now | |
| if t && 0 < t | |
| content_length = t / 100 | |
| end | |
| }, | |
| :progress_proc => lambda { |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
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'mp4info' | |
| path = ARGV[0] | |
| Dir.foreach(path) do |file| | |
| file_path = File.join path, file |
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 'sinatra' | |
| get '/hi' do | |
| "<html><head></head><body><img src=\"/images/javelin-2012-hp.jpg\" /></body></html>" | |
| end | |
| get %r{/images/(.+)} do |c| | |
| File.read(c) | |
| 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
| source :rubygems | |
| source "http://rubygems.org" | |
| gem 'vmc', '0.3.18' | |
| gem 'caldecott', '>=0.0.5' |
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
| /* | |
| * GET home page. | |
| */ | |
| var pg = require('pg'); | |
| exports.index = function(req, res){ | |
| var conString = "tcp://127.0.0.1/postgres"; | |
| var out = ""; |
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
| --- | |
| applications: | |
| - name: nodetestdh01 | |
| framework: node | |
| runtime: node08 | |
| memory: 64M | |
| instances: 1 | |
| url: nodetestdh01.${target-base} | |
| path: . | |
| env: |
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
| <snippet> | |
| <content><![CDATA[ | |
| <pre class="terminal"> | |
| $1 | |
| </pre> | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>term</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <!-- <scope>source.markdown</scope> --> |
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
| source :rubygems | |
| gem 'cfoundry' | |
| gem 'uuidtools' |
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 'cfoundry' | |
| require 'tempfile' | |
| require 'zip/zip' | |
| require 'tunnel-vmc-plugin/tunnel' | |
| CF_ENDPOINT = 'http://api.cloudfoundry.com' | |
| class DumpController < ApplicationController | |
| def new |
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
| source :rubygems | |
| gem 'sinatra' | |
| gem 'redis' | |
| gem 'httparty' |