Skip to content

Instantly share code, notes, and snippets.

View shri's full-sized avatar

Shri Ganeshram shri

  • Founder, Stealth
  • United States
View GitHub Profile
@shri
shri / htmlparser.js
Last active August 29, 2015 14:13 — forked from cburgmer/htmlparser.js
/*
* HTML Parser By John Resig (ejohn.org)
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
*
* // Use like so:
* HTMLParser(htmlString, {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
@shri
shri / tordosetup
Last active July 16, 2016 18:51
How to install a publicly accessible, but unlisted, Tor Relay on Digital Ocean
## start a droplet w/ debian installed
## ssh into your droplet
$ apt-get install tor tor-arm
$ cd /etc/tor
$ nano torrc
## replace the contents of your torrc file with the below:
SocksPort 9150
@shri
shri / glass.html
Last active August 29, 2015 14:06
[wearscript] TagAlong
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function server() {
@shri
shri / glass.html
Created July 8, 2014 01:08
[wearscript] kimono-instacart
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function centralTag( tags )
{
var distances = [];
var numTags = tags[ 0 ].length / 9;
var minDist = 1000;
@shri
shri / glass.html
Created June 14, 2014 16:35
[wearscript] fuckkillmarry
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
// Fisher-Yates shuffling algorithm (http://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array)
@shri
shri / glass.html
Created June 10, 2014 01:14
[wearscript] pebblespanish
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
// Fisher-Yates shuffling algorithm (http://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array)
@shri
shri / glass.html
Created May 6, 2014 02:22
[wearscript] ar tags on glass
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function centralTag(tags){
var distances = [];
var numTags = tags[0].length / 9;
var minDist = 1000;
var center = tags[0][0];
for (var i = 0; i < numTags; i++) {
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
function kimonoCallback(data) {
console.log(data);
if(data.lastrunstatus=="success"){
$("#a").text(JSON.stringify(data));
@shri
shri / glass.html
Created April 22, 2014 22:04
[wearscript] whosonfirst
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
@shri
shri / pokemonImages.json
Created March 25, 2014 13:31
a json file containing images of pokemon
{"Bulbasaur":"http://img.pokemondb.net/artwork/bulbasaur.jpg","Ivysaur":"http://img.pokemondb.net/artwork/ivysaur.jpg","Venusaur":"http://img.pokemondb.net/artwork/venusaur.jpg","Charmander":"http://img.pokemondb.net/artwork/charmander.jpg","Charmeleon":"http://img.pokemondb.net/artwork/charmeleon.jpg","Charizard":"http://img.pokemondb.net/artwork/charizard.jpg","Squirtle":"http://img.pokemondb.net/artwork/squirtle.jpg","Wartortle":"http://img.pokemondb.net/artwork/wartortle.jpg","Blastoise":"http://img.pokemondb.net/artwork/blastoise.jpg","Caterpie":"http://img.pokemondb.net/artwork/caterpie.jpg","Metapod":"http://img.pokemondb.net/artwork/metapod.jpg","Butterfree":"http://img.pokemondb.net/artwork/butterfree.jpg","Weedle":"http://img.pokemondb.net/artwork/weedle.jpg","Kakuna":"http://img.pokemondb.net/artwork/kakuna.jpg","Beedrill":"http://img.pokemondb.net/artwork/beedrill.jpg","Pidgey":"http://img.pokemondb.net/artwork/pidgey.jpg","Pidgeotto":"http://img.pokemondb.net/artwork/pidgeotto.jpg","Pidgeot":"htt