Skip to content

Instantly share code, notes, and snippets.

@austinpray
austinpray / .gitignore
Last active August 27, 2015 22:24
Test trellis
.tmp
@austinpray
austinpray / HOC_drinking_game.md
Last active August 29, 2015 13:56
House Of Cards Drinking Game

House Of Cards Drinking Game

Difficulty modes stack.

Easy Mode

  • Drink anytime Kevin Spacey's character talks about food, literal or metaphorically.
  • Drink twice whenever any other character talks about food metaphorically.
  • Drink every time someone cancels all their appointments.
  • Drink every time Spacey knocks twice on a hard surface.
  • Drink every time South Carolina is mentioned.
@austinpray
austinpray / twitchplayspokemonfilter.js
Last active August 29, 2015 13:56
Filters TwitchPlaysPokemon chat
var chatButton = $("ul.segmented_tabs li a").first();
$("<li><a class='CommandsToggle'>Commands</a><a class='ChatToggle'>Talk</a></li>").insertAfter(chatButton);
chatButton.css("width", chatButton.width() - 71);
$(".CommandsToggle").click(function () {
"use strict";
$("a.CommandsToggle").toggleClass("selected");
if ($(".commandsHideCSS").length !== 0) {
$(".commandsHideCSS").remove()
} else {
$("<style type='text/css' class='commandsHideCSS'>#chat_line_list li.cSpam{display:inline;}</style>").appendTo("head")
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@austinpray
austinpray / gtm_page_load.js
Created June 6, 2014 17:18
GTM Page loaded user timing
var gtmPageLoad = (function (window) {})(window);
var jq = document.createElement('script');
jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(jq);
var b, engine;
jq.onload = function () {
var ballscript = document.createElement('script');
ballscript.src = 'https://rawgit.com/austinpray/pro-grid-utils/master/ball_mod.js';
document.getElementsByTagName('head')[0].appendChild(ballscript);
ballscript.onload = function () {
b = new ball();
convert test*.png -resize 595x842 -gravity center -background white \
-extent 595x842 jason.pdf
function getPresentationTitle() {
var metas = document.getElementsByTagName('meta');
for (i=0; i<metas.length; i++) {
if (metas[i].getAttribute("name") === "og:title") {
return metas[i].getAttribute("content");
}
}
return "";
}
@austinpray
austinpray / getselectedoptiontext.js
Created July 10, 2014 15:51
Could you please whip up some javascript to pull the value from the dropdown menu of the contact form here? https://www.hahnpublic.com/contact/
function () {
var subjectDropdown = document.getElementsByName('recipient_email')[0];
return subjectDropdown.options[subjectDropdown.options.selectedIndex].text
}
@austinpray
austinpray / hahnsearchbar.js
Created July 10, 2014 16:17
And the value plugged into the search bar in the top right corner.
function () {
var searchEl = typeof document.querySelector !== 'undefined' ? document.querySelector('#search [name="keywords"]') : document.getElementsByName('keywords')[0];
return searchEl.value;
}