Skip to content

Instantly share code, notes, and snippets.

@ktkaushik
ktkaushik / port_nos.txt
Created April 27, 2012 07:22
Port nos.
Port TCP UDP Description Status
0 UDP Reserved
1 TCP UDP TCP Port Service Multiplexer (TCPMUX)
2 TCP UDP CompressNET[2] Management Utility[3]
3 TCP UDP CompressNET[2] Compression Process[4]
4 TCP UDP Unassigned
5 TCP UDP Remote Job Entry
7 TCP UDP Echo Protocol
8 TCP UDP Unassigned
@ktkaushik
ktkaushik / add_these_libraries
Created April 30, 2012 11:49
aptitude purge ruby
libffi libyaml
probably with a *-dev
@ktkaushik
ktkaushik / Steps
Created April 30, 2012 13:36
Install Ruby from the source without RVM
Tried and tested on Ubuntu
1) Open the terminal and create a folder and cd into that folder.
2) Go over to downloads section on Ruby website and there is a link for ftp server stable version of Ruby.
3) now copy that link and then type
wget link_to_download
@ktkaushik
ktkaushik / Steps
Created April 30, 2012 15:04
install mongoDB on Ubuntu
1) receive the key that 10gen has setup
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
2) sudo vi /etc/apt/sources.list and add this line at the end
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3) Update. This step is very important to load everything from sources.list from the previous step.
@ktkaushik
ktkaushik / gist:2564693
Created May 1, 2012 03:22
Libraries to keep in mind while installing Ruby
libxslt-dev
libxml2
libxml2-dev
libffi
libffi-dev
libyaml
libyaml-dev
build-essential
zlib
@ktkaushik
ktkaushik / production.rb
Created May 1, 2012 06:41
solution for asset precompilation of BootStrap when using the Gem
# This should do it.
config.assets.compile = [ Proc.new { |path|
!File.extname(path).in?(['.js', '.css', ''])
}, /(?:\/|\\|\A)application\.(css|js)$/ ]
@ktkaushik
ktkaushik / gist:2571003
Created May 1, 2012 20:09
beautiful blog
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer/
@ktkaushik
ktkaushik / 1.rb
Created May 3, 2012 09:15
Capistrano steps
# Installation
gem install capistrano
# Setting up capistrano
# Go to your application directory in the terminal and run capify .
capify .
cap deploy:setup
@ktkaushik
ktkaushik / deploy.rb
Created May 4, 2012 05:47
my capistrano setup for app on MongoDB
require "bundler/capistrano"
set :application, "quadmint"
set :repository, "git@quadsupportapp.com:quadmint"
default_run_options[:pty] = true
# set :use_sudo, false
set :scm, :git
# set :scm_command, "/usr/bin/git"
@ktkaushik
ktkaushik / gist:2593953
Created May 4, 2012 10:30
mongodb error on ubuntu
MongoDB shell version: 2.0.4
connecting to: test
Fri May 4 10:30:24 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
exception: connect failed