Skip to content

Instantly share code, notes, and snippets.

View mohnish's full-sized avatar
🐢
slow and steady

Mohnish Thallavajhula mohnish

🐢
slow and steady
View GitHub Profile
@mohnish
mohnish / application.js
Created February 27, 2012 00:45
application.js file
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
@mohnish
mohnish / application.css
Created February 27, 2012 00:55
application.css file
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
@mohnish
mohnish / application.html.erb
Created February 27, 2012 00:59
application.html.erb file
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@mohnish
mohnish / FB-Poke.js
Created June 24, 2012 01:40
Poke back everyone who pokes who and win the poke war.
// Setting up everything we need to attack the pokers ;-)
var listOfPokers = document.querySelectorAll('a[ajaxify^="/ajax/pokes/poke_inline.php?uid="]')
, poke = document.createEvent('MouseEvents')
, mouseOverPoker = document.createEvent('MouseEvents')
, pokeDialog = document.querySelector('.fbRemindersStory img[alt=Pokes]');
// Setting up the poke itself
poke.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
// Fooling FB into thinking that it's actually done by a human and not a bot
@mohnish
mohnish / prompt.sh
Created August 7, 2012 19:19 — forked from tj/prompt.sh
function git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \(\1\)/'
}
PS1=" λ \W\$(git_branch): "
PS2=" | "
@mohnish
mohnish / fb.txt
Created September 12, 2012 04:39
Facebook FU smileys
[[311455472226223]] [[311455502226220]] [[311455518892885]] [[311455538892883]] [[311455562226214]] [[311455588892878]] [[311455602226210]] [[311455638892873]] [[311455655559538]] [[311455682226202]] [[311455702226200]] [[311455718892865]] [[311455755559528]] [[311455775559526]] [[311455785559525]] [[311455795559524]] [[311455812226189]] [[311455822226188]] [[311455845559519]] [[311455872226183]] [[311455888892848]] [[311455898892847]] [[311455915559512]] [[311455938892843]] [[311455952226175]] [[311455975559506]] [[311455995559504]] [[311456002226170]] [[311456012226169]] [[311456025559501]] [[311456042226166]] [[311456058892831]] [[311456088892828]] [[311456105559493]] [[311456135559490]] [[311456155559488]] [[311456175559486]] [[311456188892818]] [[311456215559482]] [[311456225559481]] [[311456255559478]] [[311456272226143]] [[311456285559475]] [[311456302226140]] [[311456325559471]] [[311456348892802]] [[311456362226134]] [[311456382226132]] [[311456392226131]] [[311456415559462]] [[311456428892794]] [[31
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@mohnish
mohnish / mountain-lion-brew-setup.markdown
Created October 16, 2012 22:15 — forked from yetanothernguyen/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@mohnish
mohnish / Test.java
Created October 22, 2012 22:54
Getters/Setters Java
class Test {
private int count;
public Test() {
super();
this.count = 10;
}
public int getCount() {
return this.count;