Skip to content

Instantly share code, notes, and snippets.

@itslenny
itslenny / zsh.md
Created January 21, 2019 21:19 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@itslenny
itslenny / SetIsEqualShim.js
Last active November 7, 2018 08:50
JavaScript Set.prototype.isEqual shim (Set isEqual polyfill)
Set.prototype.isEqual = function(otherSet) {
if(this.size !== otherSet.size) return false;
for(let item of this) if(!otherSet.has(item)) return false;
return true;
}
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@itslenny
itslenny / load_env_heroku.js
Last active August 29, 2015 14:27
a simple script that loads your foreman .env file and sets all of the environment values on heroku
/*
load_env_heroku.js
a simple script that loads your foreman .env file
and sets all of the environment values on heroku
usage:
- place this script in the root of your project
- run: node load_env_heroku.js
*/
@itslenny
itslenny / gist:ec1a98c872e46174ece2
Last active August 29, 2015 14:11
Steal stories from watt pad 12/14/2014
//copy and paste in to javascript console
function wattTheif(){
var story="";
var curPage = 1;
var lastPage = -1;
function getPageText(){
curPage = $('.paging_input').val();
var generateArray=function(x,n)
{
var y,z;
y=" "+x; //added space here
z="";
while(n>0)
{
if(n%2)
{
z+=y;
@itslenny
itslenny / notch-drowning-autoplay
Last active August 29, 2015 14:00
Autoplay for Drowning in Problems by Notch (ludum)
//Auto play for the game drowning located here: http://game.notch.net/drowning
// restuls in a stres free life full of riches and just a little more than enough "stuff"
function getStuffCount(){
var eq = document.getElementById("equipment");
if(!eq || !eq.innerHTML) return 0;
var eqHTML = eq.innerHTML;
var sPosEnd = eqHTML.indexOf(' Stuff');
if(sPosEnd < 0) return 0;
var sPosStart = eqHTML.lastIndexOf('>',sPosEnd);