Skip to content

Instantly share code, notes, and snippets.

View markoa's full-sized avatar

Marko Anastasov markoa

View GitHub Profile
@markoa
markoa / user.rb
Created February 22, 2012 12:19 — forked from darkofabijan/user.rb
class User < ActiveRecord::Base
def find_form(id)
company.forms.find(id)
end
end
@markoa
markoa / postgis
Last active December 27, 2015 02:08 — forked from Jesterovskiy/postgis
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-9.3-postgis-2.1 postgresql-9.3-postgis-2.1-scripts
#!/usr/bin/env ruby
#
# Shotgun approach (read: slow and dirty hack) to help find unused helpers in a Rails application
#
puts "Loading all source files into memory :("
source = {}
Dir["app/**/**/*.*"].each do |f|
next if f.include?("app/assets")