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 'right_http_connection' | |
require 'tempfile' | |
c = Rightscale::HttpConnection.new | |
f = Tempfile.new('foo') | |
url = URI.parse('http://example.com/my/big/file') | |
while data = c.request(:server => url.host, :port => 80, :protocol => 'http', :request => Net::HTTP::Get.new(url.path)).body.read(1024) | |
f.write(data) |
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 nginx { | |
include monit | |
package { nginx: | |
ensure => "installed" | |
} | |
service { nginx: | |
enable => true, | |
ensure => "running", |
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
→ irb | |
>> Time.parse('tomorrow at 8pm') | |
NoMethodError: undefined method `parse' for Time:Class | |
from (irb):1 | |
>> require 'active_support' | |
=> true | |
>> Time.parse('tomorrow at 8pm') | |
=> Thu Dec 11 20:00:00 -0800 2008 | |
>> |
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
SwappableFields = Class.create({ | |
initialize: function() { | |
$$('.swappable').each(this.makeSwappable); | |
}, | |
makeSwappable: function(element) { | |
var obj = this; | |
element.observe('click', this.swap.bind(obj)); |
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
>> stuff = %Q(<object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=221785&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=221785&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><br /><a href="http://vimeo.com/221785">"Riding for a Living" - by Nitro Snowboards</a> from <a href="http://vimeo.com/nitrosnow">Nitro Snowboards</a> on <a href="http://vimeo.com">Vimeo</a>) | |
=> "<object width=\"400\" height=\"300\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=221785 |
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
--- src/http/ngx_http_upstream.c 2009-01-09 11:37:58.000000000 -0800 | |
+++ src/http/ngx_http_upstream.c 2009-01-09 12:03:18.000000000 -0800 | |
@@ -1036,8 +1036,8 @@ | |
{ | |
ssize_t n; | |
ngx_int_t rc; | |
- ngx_str_t *uri, args; | |
- ngx_uint_t i, flags; | |
+ ngx_str_t *uri, args, *hs; | |
+ ngx_uint_t i, j, flags; |
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
<IfModule mod_php5.c> | |
AddType application/x-httpd-php .php .phtml .php3 | |
AddType application/x-httpd-php-source .phps | |
</IfModule> |
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
/opt/local/etc/macports/sources.conf | |
# MacPorts system wide sources configuration file | |
# $Id: sources.conf 26177 2007-06-15 10:11:22Z jmpp@macports.org $ | |
# | |
# To enable your local ports repository, uncomment and customize the | |
# following line to point at your local ports directory | |
# Example: file:///Users/landonf/misc/MacPorts/ports | |
# | |
# To prevent a source from synchronizing when `port sync` is used, |
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
--- | |
:update_sources: true | |
:bulk_threshold: 1000 | |
:sources: | |
- http://gems.rubyforge.org/ | |
- http://gems.github.com/ | |
:verbose: true | |
:benchmark: false | |
:backtrace: false | |
gem: --no-rdoc --no-ri |
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
development: | |
adapter: mysql | |
database: macchiato_development | |
username: root | |
password: | |
host: localhost | |
encoding: utf8 | |
socket: /opt/local/var/run/mysql5/mysqld.sock | |
test: |