Skip to content

Instantly share code, notes, and snippets.

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

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile
@hemanth
hemanth / Google-sun.bash
Created June 28, 2010 20:25
Google sunrise+sunset from terminal
function sunrise() { curl -sA Mozilla http://www.google.com/search?q=sunrise+$1 \
| html2text -width 80 \
| sed -n '10s/^ \{45\}//p';}
function sunset() { curl -sA Mozilla http://www.google.com/search?q=sunset+$1 \
| html2text -width 80 \
| sed -n '/from now/s/^ \{44\}//p'; }
@hemanth
hemanth / mutt-gmail-conf.bash
Created June 29, 2010 07:31
Mutt+Gamil+SSL+Lables+Auto contact suggestions
# Set the basic credencials
#
set imap_user= 'gmailUser@gmail.com'
set imap_pass= 'password'
set hostname = "gmail.com"
set realname = "gmailUser"
# Set GMAIL specific folders likem sent mail, drafts, All mail
set spoolfile = "imaps://imap.gmail.com/INBOX"
set folder = "imaps://imap.gmail.com/"
exec 3<>/dev/tcp/www.google.com/80
echo -e "POST / HTTP/1.1\r\nhost: http://www.google.com/search?q=bash\r\nConnection: close\r\n\r\n" >&3
cat <&3
@hemanth
hemanth / gist:458534
Created June 30, 2010 11:13
Fibonacci Sequences
Ada
Recursive
function fib(n : integer) return integer is
begin
if n < 2 then
return n;
else
return fib(n-1) + fib(n-2);
end if;
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' })
<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg">
<title>Smile</title>
<defs>
<filter id="svg_8_blur" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur stdDeviation="6"/>
</filter>
<filter id="svg_12_blur" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur stdDeviation="6"/>
</filter>
</defs>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<svg xmlns="http://www.w3.org/2000/svg">
<radialGradient cx="0.5" cy="0.5" r="0.5071" spreadMethod="repeat" id="g" gradientTransform="rotate(28.94, 0.5, 0.5) translate(0, 0.0075) scale(1, 0.9851)">
<stop stop-color="rgb(255, 165, 76)" offset="0.0941"/>
<stop stop-color="#FF0" offset="0.25"/>
<stop stop-color="#0F0" offset="0.2974"/>
<stop stop-color="#00F" offset="0.5008"/>
<stop stop-color="#F0F" offset="0.9774"/>
</radialGradient>
<rect width="100%" height="100%" fill="url(#g)"/>
</svg>
# 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