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 to_s | |
'A1' | |
end | |
def to_str | |
'A2' | |
end | |
end |
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
struct S; | |
impl S { | |
fn a(&self) { | |
println!("a"); | |
} | |
fn b(&self) { | |
println!("b"); | |
} | |
} |
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
HOMEBREW_VERSION: 0.9.4 | |
ORIGIN: https://github.com/mxcl/homebrew | |
HEAD: e76ae4e896d12e3fde7fd0c06eafe846e9160ea2 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit sandybridge | |
OS X: 10.8.4-x86_64 | |
Xcode: 4.6.3 | |
CLT: 4.6.0.0.1.1365549073 | |
GCC-4.2: build 5666 |
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
diff --git a/Makefile b/Makefile | |
index 186ef46..84c8dfd 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -2,7 +2,7 @@ all: pptoken | |
# build pptoken application | |
pptoken: pptoken.cpp IPPTokenStream.h DebugPPTokenStream.h | |
- g++ -g -std=gnu++11 -Wall -o pptoken pptoken.cpp | |
+ clang++ -g -std=c++11 -stdlib=libc++ -Wall -o pptoken pptoken.cpp |
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
~/Projects/pa1 2 (master *) $ make | |
clang -g -std=c++11 -stdlib=libc++ -Wall -o pptoken pptoken.cpp | |
Undefined symbols for architecture x86_64: | |
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from: | |
std::__1::vector<std::__1::pair<int, int>, std::__1::allocator<std::__1::pair<int, int> > >::allocate(unsigned long) in pptoken-azXFj1.o | |
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from: | |
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeES9_S9_ in pptoken-azXFj1.o | |
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from: | |
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in pptoken-azXFj1.o | |
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1:: |
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
describe PortChecker do | |
around :each do |block| | |
EventMachine.run(&block) | |
end | |
it 'succeeds immediately if port is open' do | |
success = false | |
failure = false | |
EventMachine.start_server('localhost', 11111) |
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
t = Thread.new do | |
class A | |
sleep 10 | |
def self.a | |
end | |
end | |
sleep 2 | |
end | |
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
group :development, :test do | |
gem 'rspec-rails', '~> 2.9' # rails generate rspec:install | |
gem 'factory_girl_rails' | |
end | |
group :test do | |
gem 'spork-rails' # spork rspec --bootstrap | |
gem 'capybara' | |
gem 'launchy' | |
gem 'timecop' |
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
require 'haml' | |
class ErbEngine < Haml::Engine | |
def push_script(text, preserve_script, in_tag = false, preserve_tag = false, | |
escape_html = false, nuke_inner_whitespace = false) | |
push_text "<%= #{text.strip} %>" | |
end | |
def push_silent(text, can_suppress = false) | |
push_text "<% #{text.strip} %>" |
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 Api | |
extend self | |
def repository(owner, name) | |
fetch("repos/show/#{owner}/#{name}")['repository'] | |
end | |
def organization(name) | |
fetch("organizations/#{name}/public_members") | |
end |