Skip to content

Instantly share code, notes, and snippets.

View namanyayg's full-sized avatar

Namanyay Goel namanyayg

View GitHub Profile
0x00AcE143ed51fcd310b6d0197D845309f00CcE86
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},sl
<?php
$branchname = $_GET['branch'];
if (!$branchname) {
echo "Please enter a branchname, ?branch=<name>";
return false;
}
$command = 'cd <directory> && git checkout ' . $branchname;
### Keybase proof
I hereby claim:
* I am namanyayg on github.
* I am nmn (https://keybase.io/nmn) on keybase.
* I have a public key whose fingerprint is 10AD D5BC 5D61 3EEC 7225 917D 0FE5 E279 736A 5493
To claim this, I am signing this object:
@namanyayg
namanyayg / deploy.php
Last active August 29, 2015 13:57
Deployment POST-hook script for bitbucket to server cloning
<?php
$payload = '';
if ( isset($_POST['payload']) ){
$payload = json_decode($_POST['payload']);
} else {
return false;
}
$repo = $payload->repository;
@namanyayg
namanyayg / fetchcoinmarketcap.php
Created March 5, 2014 08:37
A simple script that uses phpQuery-onefile and custom PHP code to create a json file from scraping coinmarketcap.
<?php
require('phpQuery-onefile.php');
$page = phpQuery::newDocumentFileHTML('http://coinmarketcap.com/');
$cryptoprices = 'var cryptoprices = {';
$cryptoprices .= 'markets:[';
foreach( pq('tbody tr') as $row ) {
@namanyayg
namanyayg / contract.md
Last active December 10, 2015 23:28 — forked from malarkey/Contract Killer 3.md
Contract for my own use, for web design work.

Date: [date]

Between me, Namanyay Goel
and you, [customer name]

Summary:

I’ll always do my best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

So in short;

@namanyayg
namanyayg / robot.js
Created December 3, 2012 17:05
Aloo
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);