Skip to content

Instantly share code, notes, and snippets.

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

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile
@hemanth
hemanth / index.js
Last active August 29, 2015 14:16
requirebin sketch
var cnvsGrad = require('canvas-gradaint');
//canvas setup
var canvas = document.createElement('canvas');
canvas.width = '500';
canvas.height = '300';
canvas.style.outline = "1px solid black";
document.body.appendChild(canvas);
// Get the context.
@hemanth
hemanth / index.js
Created March 6, 2015 20:10
requirebin sketch
"use strict";
var animate = require('fd-animate');
var logo = document.createElement('img')
logo.src = 'https://raw.githubusercontent.com/fp-dom/logo/master/fp-dom.png';
document.body.appendChild(logo)
/* 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) {
google.pacman ||
function () {
var a = true,
e = false,
g = {},
i = [1, 4, 2, 8],
l = {
0: {
axis: 0,
increment: 0
#!/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'
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 / 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
# Newbie Programmer
def factorial(x)
if x == 0
return 1
else
return x * factorial(x - 1)
end
end
puts factorial(6)
puts factorial(0)
@hemanth
hemanth / gist:454786
Created June 27, 2010 09:24
Hello world from GNU pages
How the way people code “Hello World” varies depending on their age and job:
High School/Jr. High
10 PRINT "HELLO WORLD"
20 END
First year in College
program Hello(input, output)
begin
writeln('Hello World')