Skip to content

Instantly share code, notes, and snippets.

@bikashp
bikashp / gist:2228017
Created March 28, 2012 16:33
Utility commands
# Finding port for all running services on Mac
lsof -i -s TCP:listen
@bikashp
bikashp / line.yml
Created March 2, 2012 09:22
Variable price YAML
# ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
# Assembly Line: video-transcription
# ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
# See docs at http://cloudfactory.com/developers/
# See example lines at http://cloudfactory.com/developers/lines/
# Run `cf login` OR manually specify your API key below (See http://cloudfactory.com/developers/resources/account.html)
# api_key: fill_in_your_api_key #(optional)
title: timecoding_variable_pricing
public: false # Make your line a public line if true (http://cloudfactory.com/developers/resources/line.html#public)
#api_key: 5f27b0c87532ff8389fd4955b88b6336c579b529 #0cff92505889e9530baebda027459e1ce073e9dd
@bikashp
bikashp / gist:1472487
Created December 13, 2011 15:18
Dev packages required for certain gems while installing on linux
rmagick => libmagick9-dev
# Prj
1. Generate an app named "Pj-tracker"
2. Add nifty generator
3. Authentication with Devise
4. RSpec test coverage
5. Resources: (User, Project, Task)
6. Project and Task with status/completion
@bikashp
bikashp / unicorn
Created December 12, 2011 11:45
unicorn init script
#!/bin/bash
### BEGIN INIT INFO
# Provides: APPLICATION
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the APPLICATION unicorns at boot
# Description: Enable APPLICATION at boot time.
### END INIT INFO
@bikashp
bikashp / file 1
Created May 20, 2011 04:43
Useful Links
<b>Permanently remove files and folders from a git repository</b>
http://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
PS1="\W $ "
export PATH="/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH"
export JAVA_HOME='/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home'
export EDITOR='mate -w'
# my aliases
alias ll='ls -la'
alias e='mate . &'
alias ebash='mate ~/.bash_login &'
@bikashp
bikashp / nokogiri on mac os x
Created March 7, 2011 09:54
Installing nokogiri gem with libxml2 installed using brew
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.7/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.7/lib --with-xslt-dir=/usr/local/Cellar/libxslt