Skip to content

Instantly share code, notes, and snippets.

View hemanth's full-sized avatar
🐜
🧘‍♂️

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile
/* Author: Remy Sharp / @rem - adds <details> support to the browser */
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {
#!/bin/bash
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox/3.5'
@hemanth
hemanth / git-req
Created June 25, 2010 19:33 — forked from jsocol/git-req
#!/bin/bash
# allows you to send pull requests from the command line
# usage: git req username [comparetobranch]
# or: git req username -m 'message'
# put somewhere in your PATH as git-req and make executable
usage()
{
cat << EOF
usage: $0 options
#!/bin/bash
# Sendmail replacement inspired by CheckAttach script for mutt.
# http://wiki.mutt.org/?ConfigTricks/CheckAttach for the original script.
# To use, simply add the following line to your .muttrc:
# set sendmail="/path/to/this/script"
# Then restart mutt.
# The script uses simple pattern matching to make an oninion on whether or not
Mime: {
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".ai" : "application/postscript",
".aif" : "audio/x-aiff",
".aiff" : "audio/x-aiff",
".asc" : "application/pgp-signature",
".asf" : "video/x-ms-asf",
".asm" : "text/x-asm",
".asx" : "video/x-ms-asf",
@hemanth
hemanth / factorial.py
Created June 27, 2010 09:08 — forked from ghoseb/factorial.py
factorial.py
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
# Newbie Programmer
def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)
require 'net/http'
require 'uri'
# /api/v1/:format/new
# /api/v1/:format/gists/:user
# /api/v1/:format/:gist_id
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })
# Hey coops..
#
# Imagine yourself on the other side of the table: two job openings, hundreds of resumes,
# _all of which_ look friggin' identical. Yeah, the HR departments at your MegaCorp XYZ are using
# automated tools to scan for keywords, and the coop department at your school is trying to beat
# you into submission to follow some "predefined template".. But, unless what you're aspiring to
# is to be an automaton at MegaCorp XYZ, relegated to writing test harnesses for code that will
# never see the light of day.. please do yourself a favor, and _be different_! Be bold, dammit.
#
# (Frankly, I'm falling asleep while reading your resumes.. Wake me up! Srsly.)
@hemanth
hemanth / egit.textile
Created September 19, 2010 12:07 — forked from tekkub/egit.markdown

First, a warning

EGit/JGit is a reimplementation of git in java, due to this GitHub does not officially support it. Issues have happened and repositories have been corrupted by them. While it is usually a simple matter to repair these repos due to git’s distributed nature, be aware that EGit may not work as well as the official git binaries.

GitHub officially supports msysgit (openssh) on windows and precompiled or self-compiled binaries on mac and linux. The following guide was submitted by a user and may be out of date.


Another description on how to use EGit and how to upload to Github can be found in the following EGit Tutorial