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
// Partial response types for E*Trade API | |
// See https://apisb.etrade.com/docs/api/market/api-quote-v1.html | |
// and https://apisb.etrade.com/docs/api/market/api-market-v1.html | |
/* | |
* Quote API | |
*/ | |
export type Message = { | |
description: string; |
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/env ruby | |
require 'async' | |
require 'kernel/sync' | |
require 'async/http' | |
require 'protocol/http' | |
endpoint = Async::HTTP::Endpoint.new(URI.parse('https://www.airbnb.com')) | |
client = Async::HTTP::Client.new(endpoint) | |
request = Protocol::HTTP::Request['GET', '/help/home', Protocol::HTTP::Headers[{}], nil] |
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 ActiveRecord.method_defined? :pluck | |
raise "Upgraded to Rails 3.2, eh? It's time to remove the activerecord31_pluck.rb monkeypatch." | |
end | |
module ActiveRecord | |
class Base | |
class << self | |
delegate :pluck, :to =>:scoped | |
end | |
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
Loading containers: |panic: runtime error: index out of range | |
goroutine 1 [running]: | |
runtime.panic(0x8e42a0, 0x101ae17) | |
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6 | |
github.com/dotcloud/docker.(*Runtime).Children(0xc210099060, 0x0, 0x0, 0xc, 0x8, ...) | |
/go/src/github.com/dotcloud/docker/runtime.go:527 +0x168 | |
github.com/dotcloud/docker.(*Container).Start(0xc210167700, 0xc2100968a0, 0x0, 0x0) | |
/go/src/github.com/dotcloud/docker/container.go:859 +0x1429 | |
github.com/dotcloud/docker.(*Runtime).Register(0xc210099060, 0xc210167700, 0x40, 0xc21021ea00) |
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
[2013-02-05 11:33:46] ./installer | |
[33m[44m[1mWelcome to the Ruby Enterprise Edition installer[0m[37m[40m | |
This installer will help you install Ruby Enterprise Edition 1.8.7-2012.02. | |
Don't worry, none of your system files will be touched if you don't want them | |
to, so there is no risk that things will screw up. | |
You can expect this from the installation process: | |
[1m1.[0m[37m[40m Ruby Enterprise Edition will be compiled and optimized for speed for this | |
system. |
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
[2013-02-05 10:54:16] ./installer | |
[33m[44m[1mWelcome to the Ruby Enterprise Edition installer[0m[37m[40m | |
This installer will help you install Ruby Enterprise Edition 1.8.7-2012.02. | |
Don't worry, none of your system files will be touched if you don't want them | |
to, so there is no risk that things will screw up. | |
You can expect this from the installation process: | |
[1m1.[0m[37m[40m Ruby Enterprise Edition will be compiled and optimized for speed for this | |
system. |
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
~$ rvm remove ree | |
/Users/brian/.rvm/src/ree-1.8.7-2012.02 has already been removed. | |
/Users/brian/.rvm/rubies/ree-1.8.7-2012.02 has already been removed. | |
Removing ree-1.8.7-2012.02 aliases... | |
Removing ree-1.8.7-2012.02 wrappers... | |
Removing ree-1.8.7-2012.02 environments... | |
Removing ree-1.8.7-2012.02 binaries... | |
~$ rvm install ree | |
Searching for binary rubies, this might take some time. |
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: ruby-debuy19 is no longer maintained, use https://github.com/cldwalker/debugger | |
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/2983961) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p194 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
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 xml.dom.pulldom import START_ELEMENT, END_ELEMENT, parse | |
from xml.sax import SAXParseException | |
doc = parse("mal.xml") | |
for event, node in doc: | |
if event == START_ELEMENT: | |
print node.nodeName |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<plist version="1.0"> | |
<dict> | |
<key>Application Version</key> | |
<string>Put null chars here. In vim you can use ^Q^2.</string> | |
</dict> | |
</plist> |
NewerOlder