Skip to content

Instantly share code, notes, and snippets.

View towski's full-sized avatar

towski towski

  • San Francisco, California
View GitHub Profile
@towski
towski / Makefile
Last active August 29, 2015 14:07
rerun migration if the file is touched
# if your db is currently up to date, just run make setup to touch all the files. otherwise start the db from scratch
MIGRATIONS = $(shell ls db/migrate)
RUN_FILES = $(addprefix db/run/,$(MIGRATIONS))
all: db/run release
release:
$(MAKE) migrate
$(MAKE) db/run/tests_updated
db/run:
@stemid
stemid / colout_df.py
Last active December 18, 2015 05:39
Dwarf Fortress gamelog Colout theme for Solarized terminals.
# Colout Dwarf Fortress theme for Solarized terminals
# First install colout, go to https://github.com/nojhan/colout
#
# mkdir ~/.colout
# cp colout_df.py ~/.colout/
# tail -0f df/gamelog.txt | colout -T ~/.colout -t df
#
# I just started this for my own sake, please do add your own colors, regexes and stuff.
# By Stefan Midjich
@sj26
sj26 / assets.rake
Last active May 13, 2023 04:42
Don't discard cache during asset precompile. Full explanation and caveats: http://sj26.com/2013/02/09/the-asset-pipeline-isnt-actually-slow
# Stick this in lib/tasks/assets.rake or similar
#
# A bug was introduced in rails in 7f1a666d causing the whole application cache
# to be cleared everytime a precompile is run, but it is not neccesary and just
# slows down precompiling.
#
# Secondary consequences are the clearing of the whole cache, which if using
# the default file cache could cause an application level performance hit.
#
# This is already fixed in sprockets-rails for rails 4, but we patch here for
@xxx
xxx / redis.yml
Created January 28, 2013 22:41
initialization of sidekiq, the hard way
defaults:
:port: 6379
:host: localhost
development:
:db: 2
:namespace: development
# force use of Redis::Distributed
:host:
- localhost
@ticean
ticean / SVN_Git_Mirror.md
Created January 3, 2012 21:14
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

# Need a method that works regardless of whether active_support/core_ext is loaded or not
def today
(Time.respond_to?(:zone) && Time.zone) ?
Time.zone.today :
Date.today
end
describe 'timezone support' do
before :all do