Skip to content

Instantly share code, notes, and snippets.

View railsdev's full-sized avatar
🎯
Focusing

Hardik Joshi railsdev

🎯
Focusing
View GitHub Profile
@railsdev
railsdev / node-and-npm-in-30-seconds.sh
Created October 11, 2011 18:42 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@railsdev
railsdev / bdd.txt
Created June 19, 2012 11:26 — forked from hbdev012/bdd.txt
BDD and TDD ref.
http://www.lukeredpath.co.uk/blog/developing-a-rails-model-using-bdd-and-rspec-part-1.html
http://pure-rspec-rubynation.heroku.com/
http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html
@railsdev
railsdev / customTabsIniOS.js
Created June 19, 2012 18:54 — forked from dawsontoth/app.js
Customize the look of the tab bar in iOS Appcelerator Titanium
/**
* Override a tab group's tab bar on iOS.
*
* NOTE: Call this function on a tabGroup AFTER you have added all of your tabs to it! We'll look at the tabs that exist
* to generate the overriding tab bar view. If your tabs change, call this function again and we'll update the display.
*
* @param tabGroup The tab group to override
* @param backgroundOptions The options for the background view; use properties like backgroundColor, or backgroundImage.
* @param selectedOptions The options for a selected tab button.
* @param deselectedOptions The options for a deselected tab button.
@railsdev
railsdev / gist:2973432
Created June 22, 2012 15:22 — forked from obrok/gist:2499900
Setting up fresh Ubuntu server for Rails

Setting up fresh Ubuntu server for Rails

Preparations

$ sudo -i

Set preferred editor

$ export EDITOR=vim
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
command: "mkdir /opt/elasticbeanstalk/hooks/postinit"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@railsdev
railsdev / fetch_rubymine_license.rb
Created August 30, 2019 08:12 — forked from momenian/fetch_rubymine_license.rb
Automate rubymine license fetching
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'digest/md5'
require 'pp'
begin
require 'faker'
rescue LoadError
puts "You should install faker gem. (gem install faker)"
exit