Skip to content

Instantly share code, notes, and snippets.

View angrytoast's full-sized avatar

Gary Gao angrytoast

View GitHub Profile
@angrytoast
angrytoast / Mother Jones.js
Created June 4, 2011 23:22
Zotero - Mother Jones website translator
{
"translatorID": "2158b838-f982-4f32-8744-69b19c7e75fd",
"label": "Mother Jones",
"creator": "Gary Gao",
"target": "http://(www\\.)?motherjones.com",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
"inRepository": "0",
"translatorType": 4,
@angrytoast
angrytoast / firecatwiki.js
Created February 5, 2012 05:21
Category suggestion for Wikipeda
/*This function adds a jQuery include, this adds the latest version, instead of the version on wikipedia, which is outdated */
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@angrytoast
angrytoast / firecat.css
Created February 9, 2012 20:07
Firecat css
#firecat h1 {
margin: .2em 0 .6em;
padding: 0;
font-size: 1.2em;
}
#firecat {
position: fixed;
z-index: 999;
top: 10px;
right: 10px;
@angrytoast
angrytoast / catList.js
Created February 15, 2012 23:57
top 200 used from featured articles
var catList = ["Living people","Windows games","English-language albums","English-language films","Grammy Award winners","Fungi of North America","Year of birth unknown","Fungi of Asia","Fungi of Europe","Animals described in 1758","American film actors","Wisden Cricketers of the Year","Video games developed in the United States","PlayStation 2 games","Australian aviators","Article Feedback 5","Knights of the Garter","Australian cricketers","Article Feedback Blacklist","American people of English descent","Military history of Japan during World War II","Deaths from myocardial infarction","Conflicts in 1942","Birds of Europe","Australia Test cricketers","Interactive Achievement Award winners","Companions of the Distinguished Service Order","Battles and operations of World War II involving the Solomon Islands","Xbox 360 games","Video game sequels","Royal Australian Air Force personnel of World War II","Governors of Kentucky","Commanders of the Order of the British Empire","Oryzomyini","Musical quartets","Monoty
@angrytoast
angrytoast / firecat.html
Created February 19, 2012 22:18
firecat html layout
<div id="firecat">
<div style="text-align:right;" class="ctrl"><b style="display:none;cursor:pointer;" class="show">Show</b><b style="cursor:pointer;" class="hide">Collapse</b></div>
<div id="firecatCon">
<div style="position:absolute;right:10px;width:450px;height:382px;overflow-y:auto;" class="maintxt txt"></div>
<div id="firecatSel"><h5>Selected Terms</h5>
<div class="txt"></div>
<div class="search"></div>
</div>
// Base stream obj
var user_activity = {
'id' : new Date().getTime() + navigator.userAgent,
'uri' : document.location.pathname,
'stream' : {}
};
var INTERVAL = 2000; // check cursor every 2 secs
function log_activity(e){
var d = new Date();
@angrytoast
angrytoast / omghosts
Created April 10, 2014 23:39
omg hosts
#! /usr/bin/env bash
PROBLEM="$(cat /etc/hosts | grep tableausoftware.com | grep -v '^#' | wc -w)"
if [ "$PROBLEM" -gt 0 ]; then
say omg fix yer hosts
fi
@angrytoast
angrytoast / release_template
Last active July 14, 2021 09:29
GitHub Release Template
# DATE - "RELEASE NAME" #1000009
![ALT TEXT](IMAGE_URL "IMAGE TITLE")
### New Features / Projects
* __PROJECT / FEATURE__ [#42] - by @person
* __PROJECT / FEATURE__ [#42] - by @person
* __PROJECT / FEATURE__ [#42] - by @person
* __PROJECT / FEATURE__ [#42] - by @person
@angrytoast
angrytoast / pr-populate.js
Last active August 29, 2015 14:00
github pull request template bookmarklet
javascript:(function() {var e = jQuery('[id^=pull_request_body]');if (e.length) {e.val('## What? Why?\nWhat was changed. Why did are we making this change?\n\n\n## Release Notes\n- Description text for the weekly report.\n- Description text for the weekly report.\n\n\n## Deployment Steps\nWhat needs to be done on day of launch.');}})();
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = white bold
frag = magenta ul
old = red