Skip to content

Instantly share code, notes, and snippets.

View dmitry-ilyashevich's full-sized avatar

Dzmitry Ilyashevich dmitry-ilyashevich

View GitHub Profile
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input-HTML.html
Created January 13, 2014 17:30
Generated by SassMeister.com.
<div></div>
def to_i(w)
r = 0
w.each_char { |ch| r = r | (1 << ch.ord - 96) }
r
end
@dict_word_letters = {}
class KoModel
indexed_error_for: (property_name, index, nested_property = null) =>
ko.computed =>
return unless @errors() and error_property = @errors()[property_name]
error = jQuery.grep error_property, (item) ->
item.index == index
return '' unless error and error.length
Resque::Worker.working.each{ |worker| worker.done_working }
ack "search text" -l --print0 | xargs -0 -n 1 sed -i "s/search text/replacement text/"
@dmitry-ilyashevich
dmitry-ilyashevich / ppa_keys.sh
Created March 3, 2013 16:25
Add missing ppa gpg pubkeys
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [PUBKEY_FINGERPRINTS]
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git
@dmitry-ilyashevich
dmitry-ilyashevich / nokogiri libxml homebrew lion
Created September 7, 2012 21:55 — forked from devpuppy/nokogiri libxml homebrew lion
How to fix: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2