# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
# The partition (combinatoric partition theory) function for a given number | |
def partition(largest, rest = Array.new, &block) | |
block.call([largest] + rest) | |
(rest.first || 1).upto(largest / 2) do |i| | |
partition(largest - i, [i] + rest, &block) | |
end | |
end | |
# call the partition function with "5" as a test | |
partition(5) { |nums| p nums if nums[0] != 5 } |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
# gem 'therubyracer' | |
gem 'uglifier', '>= 1.0.3' | |
# Add Foundation Here | |
gem 'compass-rails' # you need this or you get an err |
From Microsoft Blog and html5please:
Internet Explorer 10 doesn’t include support for CSS border-image. To preserve the layout of your page, a best practice is to specify a solid border-style fallback so border widths, padding, and margin are preserved. (If IE doesn’t find a supported border type, it will discard those values.) For example:
Before:
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
# Legitimately-useful utilities missing from OS X. | |
brew install wget watch gnu-sed coreutils | |
# Up-to-date versions of included tools. | |
brew install git emacs | |
# Just for fun. | |
brew install fortune cowsay |
# dump all databases once every 24 hours | |
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz | |
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night) | |
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze" | |
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet" | |
# re-index all databases once a week | |
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"' |