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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
use std::mem; | |
use std::ptr; | |
fn spooky(_data: &[f32; 3]) { | |
// This function does nothing. Calling it should have no effect on the program. | |
} | |
pub fn main() { | |
let data1 = [1.0, 2.0, 3.0]; | |
let data2 = [1.0, 2.0, 3.0]; |
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
$ curl -Ss "https://www.howsmyssl.com/a/check" | jsonpp | |
{ | |
"given_cipher_suites": [ | |
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA", | |
"TLS_DHE_DSS_WITH_AES_256_CBC_SHA", | |
"TLS_RSA_WITH_AES_256_CBC_SHA", | |
"TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA", | |
"TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA", | |
"TLS_RSA_WITH_3DES_EDE_CBC_SHA", | |
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA", |
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
$ curl -v https://rubygems.global.ssl.fastly.net/ | |
* About to connect() to rubygems.global.ssl.fastly.net port 443 (#0) | |
* Trying 199.27.73.185... | |
* Connection refused | |
* couldn't connect to host | |
* Closing connection #0 | |
curl: (7) couldn't connect to host | |
$ curl -v http://rubygems.global.ssl.fastly.net/ | |
* About to connect() to rubygems.global.ssl.fastly.net port 80 (#0) |
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
$ ruby -v | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.2] | |
$ time ruby open_timeout.rb | |
/Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `initialize': execution expired (Timeout::Error) | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `open' | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `block in connect' | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in `connect' | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start' | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744:in `start' | |
from /Users/michaelfairley/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1284:in `request' |
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
-module(bowling). | |
-export([main/1]). | |
main(_) -> | |
test(). | |
test() -> | |
% empty | |
[] = score([]), | |
% boring |
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 "https://rubygems.org" | |
gem 'mutant', '0.3.0.beta17' | |
gem 'rspec', '2.14.1' |
- ice_nine: Deep freeze ruby objects
- Values: Simple immutable value objects for ruby
- immutable_attributes: specify attributes within an ActiveRecord model that can be set but not modified
- hamster: Efficient, Immutable, Thread-Safe Collection classes for Ruby
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
class A | |
def self.set | |
@x = "hello" | |
end | |
def self.get | |
@x || "byebye" | |
end | |
end |