Skip to content

Instantly share code, notes, and snippets.

View darashi's full-sized avatar

Yoji Shidara darashi

View GitHub Profile
@lazyatom
lazyatom / Gemfile
Created March 26, 2012 10:25
Looking at comment quality with EuRuKo 2012's pull request CFP strategy
source :rubygems
gem "multi_json"
gem "yajl-ruby"
@martinisoft
martinisoft / fix-nokogiri.md
Last active October 1, 2015 23:48
Nokogiri working install with latest XCode or you get "WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.7.8"

Homebrew has blacklisted libiconv so the majority of your help via google will not work now.
Here's a way I figured out how to get nokogiri to compile if you made the mistake of upgrading your XCode version

  1. Install packages via homebrew
brew update
brew install libxml2
brew install libxslt
@kylefox
kylefox / gist:1482281
Created December 15, 2011 18:44
Passenger uses wrong URL to download PCRE.
PCRE (required by Nginx) not installed, downloading it...
# wget -O /tmp/ubuntu-passenger-7717/pcre.tar.gz ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
--2011-12-15 18:38:20-- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
=> `/tmp/ubuntu-passenger-7717/pcre.tar.gz'
Resolving ftp.csx.cam.ac.uk... 131.111.8.80
Connecting to ftp.csx.cam.ac.uk|131.111.8.80|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/software/programming/pcre ... done.
==> SIZE pcre-8.12.tar.gz ... done.
@kei-s
kei-s / CharacterReference.js
Created April 23, 2009 14:22
(encode || decode) character reference
function decode(line) {
return line.replace(/&([#0-9a-zA-Z]+?);/g,function(entity,code){
if (/^#[0-9]+$/.test(code)) {
return String.fromCharCode(code.slice(1));
}
if (/^#x[0-9a-fA-F]+$/.test(code)) {
return String.fromCharCode(parseInt(code.slice(2),16));
}
return referenceMap[code] ? String.fromCharCode(referenceMap[code]) : entity;
});
@weppos
weppos / capistrano_database_yml.rb
Created July 27, 2008 10:04
Provides a couple of tasks for creating the database.yml configuration file dynamically when deploy:setup is run.
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <[email protected]>
# Copyright:: 2007-2010 The Authors