Skip to content

Instantly share code, notes, and snippets.

View KushalP's full-sized avatar

Kushal Pisavadia KushalP

View GitHub Profile
after running:
- sudo gem install rails --no-ri --no-rdoc
- mkdir -p /var/www
- set up nginx and virtual host
$ gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.8, 2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.8, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.8, 2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.8, 2.3.5, 2.2.2)
activesupport (2.3.8, 2.3.5, 2.2.2, 1.4.4)
filetype on
filetype indent on
filetype plugin on " use the file type plugins
" general things
set nocompatible
syntax on " syntax highlighting
set noerrorbells " don't make noise
@KushalP
KushalP / less.vim
Created October 25, 2010 22:55 — forked from bryanjswift/less.vim
" Vim syntax file
" Language: LESS Cascading Style Sheets
" Maintainer: Leaf Corcoran <[email protected]>
" Modifier: Bryan J Swift <[email protected]>
" URL: http://leafo.net/lessphp/vim/less.vim
" URL: http://gist.github.com/161047
" Last Change: 2009 August 4
" LESS by Leaf Corcoran
" CSS2 by Nikolai Weibull
" Full CSS2, HTML4 support by Yeti
brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib
You have unbrewed dylibs in /usr/local/lib. If you didn't put them there on purpose,
they could cause problems when building Homebrew formulae.
Unexpected dylibs (delete if they are no longer needed):
/usr/local/lib/libaspell.15.1.4.dylib
/usr/local/lib/libpspell.15.1.4.dylib
brew install thrift
==> Downloading http://www.apache.org/dist/incubator/thrift/0.5.0-incubating/thrift-0.5.0.tar.gz
File already downloaded and cached to /Users/kushalpisavadia/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/thrift/0.5.0 --libdir=/usr/local/Cellar/thrift/0.5.0/lib --without-java --with
==> make
make all-recursive
Making all in compiler/cpp
make all-am
/usr/bin/c++ -DHAVE_CONFIG_H -I. -I../.. -Wall -I./src -O3 -march=core2 -msse4.1 -w -pipe -MT thrift-thrifty.o -MD -MP -MF .deps/thrift-thrifty.Tpo -c -o thrift-thrifty.o `test -f 'thrifty.cc' || echo './'`thrifty.cc
/usr/bin/c++ -DHAVE_CONFIG_H -I. -I../.. -Wall -I./src -O3 -march=core2 -msse4.1 -w -pipe -MT thrift-thriftl.o -MD -MP -MF .deps/thrift-thriftl.Tpo -c -o thrift-thriftl.o `test -f 'thriftl.cc' || echo './'`thriftl.cc
-module(fizzbuzz).
-export([fizzbuzz/1]).
-import(lists, [reverse/1]).
% Given an Integer, drill down
fzbz(N) when N rem 3 == 0, N rem 5 == 0 -> "FizzBuzz";
fzbz(N) when N rem 3 == 0 -> "Fizz";
fzbz(N) when N rem 5 == 0 -> "Buzz";
fzbz(N) -> N.
<?php
/**
* @author Anush Prem <[email protected]>
* @package Solver
* @subpackage Sudoku
* @version 0.1
*/
/**
@KushalP
KushalP / const_switch.c
Created April 7, 2011 17:49
This always prints 'none'
#include <stdio.h>
const char *example(int num) {
const char *str;
switch (num) {
case 1:
str = "one";
case 2:
str = "two";
@KushalP
KushalP / test_search.py
Created April 21, 2011 13:55
Testing status codes
def test_search_returns_useful_shell_status():
"""
Searh returns a useful shell status code
"""
self.assertRaises(SystemExit, run_pip('search', 'pip'), 0)
self.assertRaises(SystemExit, run_pip('search'), 1)
self.assertRaises(SystemExit, run_pip('search', 'wysiwyg-test-name-package'), 23)