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
should "not drop utf-8 bytes" do | |
assert_equal "あいえお", "あ\000い\343う\201え\202お".printable! | |
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
Capybara.register_driver :webkit_ignore_ssl do |app| | |
browser = Capybara::Webkit::Browser.new(Capybara::Webkit::Connection.new) | |
browser.ignore_ssl_errors | |
Capybara::Webkit::Driver.new(app, :browser => browser) | |
end | |
Capybara.javascript_driver = :webkit_ignore_ssl |
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
Using eventmachine (1.0.0.rc.4) from git://github.com/eventmachine/eventmachine.git (at master) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/usr0600238/.rbenv/versions/2.0.0-dev/bin/ruby extconf.rb | |
checking for rb_trap_immediate in ruby.h,rubysig.h... no | |
checking for rb_thread_blocking_region()... yes | |
checking for inotify_init() in sys/inotify.h... no | |
checking for __NR_inotify_init in sys/syscall.h... no | |
checking for writev() in sys/uio.h... yes | |
checking for rb_thread_check_ints()... yes |
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
open('.env') do |file| | |
file.readlines.each do |line| | |
line.scan(/(.*)\=(.*)/) do |key, val| | |
ENV[key] = val | |
end | |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Pod::Usage; | |
use Text::Markdown 'markdown'; | |
use HTML::TreeBuilder; | |
use List::Util 'max'; | |
use Encode; |
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 'active_record/connection_adapters/abstract_mysql_adapter' | |
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2Adapter < AbstractMysqlAdapter | |
def release_savepoint | |
# noop | |
end | |
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
% CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-dev | |
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz... | |
Installing yaml-0.1.4... | |
Installed yaml-0.1.4 to /Users/hsbt/.rbenv/versions/2.0.0-dev | |
Cloning https://github.com/ruby/ruby.git... | |
Installing ruby-2.0.0-dev... | |
BUILD FAILED | |
Inspect or clean up the working tree at /var/folders/gt/8trm8_5d23zb87trxswvxh5c0000gn/T/ruby-build.20120819085003.80960 |
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
changelog = Hash.new | |
open('ChangeLog').each do |line| | |
if line =~ /^(\d{4}\-\d{2}\-\d{2})/ | |
changelog[$1] = "" | |
else | |
changelog[changelog.keys.last] << line | |
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
Mail.defaults do | |
delivery_method :smtp, :user_name => ENV['MAIL_ADDRESS'], | |
:password => ENV['MAIL_PASSWORD'], | |
:address => 'smtp.gmail.com', | |
:port => 587 | |
end | |
Mail.deliver do | |
from ENV['MAIL_ADDRESS'] | |
to ENV['MAIL_ADDRESS_TO'] |
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
% gem up | |
Updating installed gems | |
Updating libv8 | |
ERROR: While executing gem ... (Zlib::BufError) | |
buffer error |