Skip to content

Instantly share code, notes, and snippets.

View GarrettS's full-sized avatar

Garrett Smith GarrettS

View GitHub Profile
@GarrettS
GarrettS / index.html
Created April 10, 2019 22:19
Welcome to Walmart Walmart Interview Question // source https://jsbin.com/jajazed
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Walmart Interview Question">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Welcome to Walmart</title>
</head>
<body>
@GarrettS
GarrettS / index.html
Created April 10, 2019 22:19
Welcome to Walmart Walmart Interview Question // source https://jsbin.com/jajazed
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Walmart Interview Question">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Welcome to Walmart</title>
</head>
<body>
@GarrettS
GarrettS / index.html
Last active April 10, 2019 16:21
Text Dollar — JP Morgan Chase Interview Question // source https://jsbin.com/tinuqar
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="JP Morgan Chase Interview Question">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JP Morgan Chase Intervew Question</title>
</head>
<body>
<h1></h1>
@GarrettS
GarrettS / index.html
Last active April 10, 2019 16:18
Max Range Sum — JP Morgan Chase Interview Question // source https://jsbin.com/cikekev
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="JP Morgan Chase Intervew Question">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JP Morgan Chase Intervew Question</title>
</head>
<body>
@GarrettS
GarrettS / YouTube Speed & Pitch
Last active October 17, 2017 06:11
Updated for standalone Video Player and also Framed Tweet Media (Edit Tweet ID)
(
function(v,n) {
var doc = this.contentDocument || document;
if(!v) v = doc.querySelector("video");
if(!v) return;
var fbButtonsDiv = doc.getElementById("fbPhotoPageButtons");
var artistworksDiv = doc.getElementById("playlist0");
@GarrettS
GarrettS / tco no
Created June 21, 2012 23:46
tco no
document.addEventListener("mouseover", function(e) {
var t=e.target, u;
if(!t.href) t = t.parentNode;
if(t.href) {
if(t.host=="t.co"){
u=t.getAttribute("data-expanded-url");
if(!u && t.search) {
u=(u=t.search.match(/\burl=(.+)?&/))&&unescape(u[1]);
} else if(!u && t.title.indexOf("http") == 0) {
u = t.title;
@GarrettS
GarrettS / bind
Last active December 26, 2015 10:49
Function.prototype.bind example.
var couple = { m : "Garrett", f : "Tomomi" };
var marriage = function() { console.log(this.f + " is married to " + this.m); };
var status = marriage.bind(couple);
status();
"Tomomi is married to Garrett";
@GarrettS
GarrettS / usurp-tco.js
Created January 29, 2012 18:58
UsurpTCO
function tcoToLinkTitleURL(ev) {
var target = ev.target;
if(/^(http(?:s?):)?\/\/t.co\//.test(target.href) && /^(http(?:s?):)?\/\//.test(target.title)) {
target.href = target.title;
}
}
if(location.hostname == "twitter.com") {
document.addEventListener("mousedown", tcoToLinkTitleURL, true);
}
@GarrettS
GarrettS / usurp-tco.js
Created January 29, 2012 18:58
UsurpTCO
javascript: void(function(){document.addEventListener("mousedown", tcoToLinkTitleURL, true); function tcoToLinkTitleURL(ev) { var target = ev.target; if(/^http(?:s?):\/\/t.co\//.test(target.href)) target.href=target.title; } }());
@GarrettS
GarrettS / ndaa-flyer
Created January 9, 2012 22:40
NDAA Flyer
[FRONT]
NDAA - Indefinite Detention with no trial.
[/FRONT]
[BACK]
NDAA of 2012
Indefinite Detention with no trial. On Dec 2011, Congress and President Obama passed NDAA 2012. NDAA goes against most of the bill of rights, habeas corpus, and posse comitatus.
Taxpayer Cost: $622 billion