Skip to content

Instantly share code, notes, and snippets.

View HandyAndyShortStack's full-sized avatar

Andy Short HandyAndyShortStack

View GitHub Profile
@HandyAndyShortStack
HandyAndyShortStack / solution_20.js
Created April 23, 2015 17:32
random permutation
function removeAt(arr, num, index = 0, accum = []) {
let [car, ...cdr] = arr;
index += 1;
if (arr.length < 1) {
return accum;
} else if (index !== num) {
accum.push(car);
}
<!DOCTYPE html>
<html>
<head>
<title>hive test</title>
<style>
td { border: solid; }
</style>
</head>
<body>
<table>
@HandyAndyShortStack
HandyAndyShortStack / index.html
Last active August 29, 2015 14:02
testing behavior of script tags in bob's browser
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="main.js"></script>
</head>
<body>
<script id="template" type="text/template">
<script type="text/javascript">
console.log("inline script");
@HandyAndyShortStack
HandyAndyShortStack / .gitignore
Last active August 29, 2015 14:02
another revenue report
node_modules/
<!DOCTYPE html>
<head>
<title>Living Rabbits</title>
</head>
<body>
<h1>Here Are My Rabbits</h1>
<img src="http://www.clipartbest.com/cliparts/yik/nE6/yiknE6niE.gif" />
<div id="rabbits">
<!-- we want the rabbits here -->
@HandyAndyShortStack
HandyAndyShortStack / adder.js
Last active August 29, 2015 13:57
asynchronous document.write test
$(function() {
var script = $('<script src="http://ir-na.amazon-adsystem.com/s/asw.js" type="text/javascript"></script>"');
script.appendTo($('body'));
});
@HandyAndyShortStack
HandyAndyShortStack / writer.js
Created March 21, 2014 21:23
asynchrounous documnet.write component
document.write('hello there');
alert('foo');
@HandyAndyShortStack
HandyAndyShortStack / index.html
Created February 28, 2014 21:31
Second attempt at resolving scrolling issue with jquery-sortable
<!DOCTYPE html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.js"></script>
<script src="jquery-sortable-5a89cc9.js"></script>
<style>
.scrollable {
width: 480px;
overflow-y: scroll;
height: 500px;
@HandyAndyShortStack
HandyAndyShortStack / index.html
Created February 28, 2014 17:25
further complications with jquery-sortable and scrolling
<!DOCTYPE html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.js"></script>
<script src="jquery-sortable-fce46da4690ebd4a7275c6d4342bd31d41ea0886.js"></script>
<style>
.scrollable {
width: 480px;
overflow-y: scroll;
height: 500px;