Skip to content

Instantly share code, notes, and snippets.

View gautamk's full-sized avatar

Gautam gautamk

  • Block | Meta | Appdynamics | Cisco | Amazon | University of Washington
  • PST
View GitHub Profile
@gautamk
gautamk / download.gitignore.py
Created October 10, 2012 10:54
Download .gitignore files from github
#!/usr/bin/env python
import sys,urllib2,json
data={}
raw_data = "raw_data"
parsed_data = "parsed_data"
file_names = "file_names"
def exit():
sys.exit("----")
@gautamk
gautamk / android_hands-on_requirements.md
Created July 29, 2012 12:47
Requirements for android custom views hands on presentation.

Android Hands-on Building Custom Views

Personal Requirements

  • A good understanding of Java
  • Basic working knowledge of android (at least a Hello World program)

Software Requirements

  • Eclipse 3.6+ (recommended eclipse 4.2 Juno)
  • Android ADT plugin 15+ (recommended ADT 20)
  • Android SDK for Gingerbread (API Level 9)
@gautamk
gautamk / webrick_start.sh
Created July 27, 2012 03:56
Start webrick server to serve files in the local directory
ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start"
@gautamk
gautamk / play-benchmark1
Created May 10, 2012 04:13
Play Framework Benchmarks
$ ab -n 10000 -c 100 "http://localhost:9002/Socket/select?columnFamily=lost"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@gautamk
gautamk / eclipse
Created April 27, 2012 12:08
Various Command and Scripts to remember
#!/bin/bash
/path/to/eclipse &
P=`which eclipse`
disown `pidof ${P}`
@gautamk
gautamk / flipkart_banners.html
Created April 13, 2012 10:30
Flipkart Banner Aside designed for Octopress
<!--
Flipkart Banner Aside designed for Octopress
@file source/_include/custom/asides/flipkart_banners.html
@author Gautam
USAGE Scroll down
-->
<section id="flipkart-banner-container">
<h1>Recommendations</h1>
<p>
<style type="text/css">
@gautamk
gautamk / mongo_array_insert.php
Created March 19, 2012 00:49
Script to insert an array into mongodb and retrieve its id
<?php
/**
* This Script inserts a mongo array in the database and
* retrieves its id and displays it
*/
$form=array(
"model"=>"DynamicFormResponse",
"options"=>array(
"type"=>"post",
@gautamk
gautamk / wgetAlert.sh
Created March 17, 2012 12:17
Script to display an alert message once downloads complete
#!/bin/bash
#
# Script to display an alert message once downloads complete
# Takes the same parameters as wget
#
wget $@
wait
zenity --info --text="Download Complete"
@gautamk
gautamk / startVM.sh
Created March 17, 2012 12:15
A shell Script to start VirtualBox VMs in Various Modes , Useful when placed in ~/bin
#!/bin/zsh
#
# A shell Script to start VirtualBox VMs in Various Modes
# Useful when placed in ~/bin
#
type=""
case $2 in
[g|G] )
type="gui"
;;
@gautamk
gautamk / gist:2016111
Created March 11, 2012 11:35
Delete local and remote branches
############ GIT ################
# Delete local branch
git branch -D <branch-name>
# Delete remote branch
git push origin :<branch-name>