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
ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@remotehost |
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
git push origin master:refs/heads/production | |
git checkout --track -b production origin/production |
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
From a533eba6556483936d2cf52d633f1ac484b7a12f Mon Sep 17 00:00:00 2001 | |
From: Marshall Huss <mwhuss@gmail.com> | |
Date: Mon, 18 May 2009 18:34:44 -0400 | |
Subject: [PATCH] Added some more tests for proxy support | |
--- | |
activeresource/lib/active_resource/base.rb | 22 ++++++++ | |
activeresource/lib/active_resource/connection.rb | 12 ++++- | |
activeresource/test/base_test.rb | 64 ++++++++++++++++++++++ | |
activeresource/test/connection_test.rb | 10 ++++ |
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
# If your Active Resource object is required to use an HTTP Proxy you can set the +proxy+ value which hold a URI. | |
# | |
# class PersonResource < ActiveResource::Base | |
# self.site = "http://api.people.com:3000/" | |
# self.proxy = "http://user:password@proxy.people.com:8080" | |
# 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
class PersonResource < ActiveResource::Base | |
self.site = "http://api.people.com:3000/" | |
self.proxy = "http://user:password@proxy.people.com:8080" | |
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
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema; |
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
use Rack::Static, :urls => ["/stylesheets", "/images"], :root => "public" | |
run lambda { |env| [200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html', File::RDONLY)] } |
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
- MySite | |
|-config.ru | |
|-public | |
|-index.html | |
|-stylesheets | |
|-images |
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
$ curl -I http://nezumiapp.com/ | |
HTTP/1.1 200 OK | |
Server: nginx/0.6.39 | |
Date: Mon, 14 Dec 2009 02:30:04 GMT | |
Content-Type: text/html | |
Connection: keep-alive | |
Cache-Control: public, max-age=86400 | |
Content-Length: 1591 | |
X-Varnish: 360981972 358026896 | |
Age: 75083 |
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 Numeric | |
def neg | |
self.abs * -1 | |
end | |
end | |
puts 5.neg # => -5 |
OlderNewer