This file contains 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 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 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 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 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
$ = jQuery | |
$.extend $.fn, | |
serializeObject: () -> | |
e = $(this) | |
a = e.serializeArray() | |
o = {} | |
$.each a, -> | |
if o[this.name] != undefined |
This file contains 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
#/**********************************************************\ | |
# | |
# Auto-Generated Plugin Configuration file | |
# for Concept PM Communicator | |
# | |
#\**********************************************************/ | |
set(PLUGIN_NAME "ConceptPMCommunicator") | |
set(PLUGIN_PREFIX "CPC") | |
set(COMPANY_NAME "TactusworksLtd") |
This file contains 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 'datamapper' | |
require 'rspec' | |
class Book | |
include DataMapper::Resource | |
property :id, Serial |
This file contains 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 | |
pid = Process.fork do | |
exec 'ls -al' | |
end | |
puts "pid is #{pid}" | |
Process.detach pid |
This file contains 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
window.template_manager = new TemplateManager() | |
configuration = {} | |
template_manager.load_template "tabs", "/templates/_tabitems.handlebars", -> | |
markup = template_manager.transform "tabs", configuration | |
This file contains 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 User | |
# attr :password | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String | |
property :email, String | |
property :password, String |