Skip to content

Instantly share code, notes, and snippets.

View kulbida's full-sized avatar
🎯
Focusing

Bogdan Kulbida kulbida

🎯
Focusing
View GitHub Profile
#!/bin/sh
for branch in $(git branch | grep TEXT_MATCH_PATTERN_GOES_HERE | grep -v grep)
do
git branch -d $branch
done
@kulbida
kulbida / monitrc
Created February 11, 2014 16:59 — forked from franck/monitrc
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.
class User < ActiveRecord::Base
has_many :columns
def as_json(options={})
attributes.slice(:id, :email, :uuid).merge(:columns => columns)
end
end
class Column < ActiveRecord::Base
belongs_to :user
has_many :boxes
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@kulbida
kulbida / gist:4702027
Created February 3, 2013 14:38
Pow issue with current gemset.
rvm env -- `rvm current` >> .powenv
@kulbida
kulbida / ruby_segmentation_fault
Created November 30, 2012 10:37
Ruby 1.9.3 Segmentation fault
rvm pkg install iconv
rvm pkg install openssl
rvm reinstall 1.9.3 --with-openssl-dir=~/.rvm/usr --with-iconv-dir=~/.rvm/usr