Skip to content

Instantly share code, notes, and snippets.

View hsbt's full-sized avatar
🏠
Working from home

Hiroshi SHIBATA hsbt

🏠
Working from home
View GitHub Profile
should "not drop utf-8 bytes" do
assert_equal "あいえお", "あ\000い\343う\201え\202お".printable!
end
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
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
open('.env') do |file|
file.readlines.each do |line|
line.scan(/(.*)\=(.*)/) do |key, val|
ENV[key] = val
end
end
end
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
use Encode;
require 'active_record/connection_adapters/abstract_mysql_adapter'
module ActiveRecord
module ConnectionAdapters
class Mysql2Adapter < AbstractMysqlAdapter
def release_savepoint
# noop
end
end
end
% 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
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
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']
% gem up
Updating installed gems
Updating libv8
ERROR: While executing gem ... (Zlib::BufError)
buffer error