Skip to content

Instantly share code, notes, and snippets.

View coderxin's full-sized avatar
🦀

Andrejs Eisaks coderxin

🦀
View GitHub Profile
# Amadeusz Juskowiak <amadeusz@amanointeractive.com> 2012 - MIT License
# 1. Put inside helpers do .. end
# 2. Set CACHE_DIR to somewhere writable and private (like CACHE_DIR=File.dirname(__FILE__) + '/tmp'
# 3. Use it! You can use fragment_expire to remove cache with given name.
#
# Example:
# %h1 foo
# = cache_fragment(:report, 300) do
# - data = get_data_slowly
@coderxin
coderxin / git-merge-tool
Created May 23, 2013 17:14
How to set Sublime Text 2 as Git merge tool? https://coderwall.com/p/fypiga
git config --global mergetool.sublime.cmd "subl -w \$MERGED"
git config --global mergetool.sublime.trustExitCode false
git config --global merge.tool sublime
git mergetool -y
@coderxin
coderxin / list_of_countries.rb
Created June 9, 2012 18:23 — forked from Aupajo/list_of_countries.rb
List of countries in a handy Ruby array
COUNTRIES = [
"Afghanistan",
"Aland Islands",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",