This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple Asynchronous Cache | |
// miss: a function that computes the value for the given key. | |
// Takes two parameters: | |
// * key: the key passed to AsyncCache.get() | |
// * set: a callback that sets the value for key | |
// hash: an optional function that generates a hash string for a given key. | |
// Takes one parameter: | |
// * key | |
function AsyncCache(miss, hash) { | |
var cache = {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.vtruncate = function(opts) { | |
opts = opts || {}; | |
var showTitle = opts.showTitle || false, | |
truncText = opts.truncText || "…", | |
split = [" ",""]; | |
this.each(function() { | |
var $el = $(this), | |
oldtext = $el.attr("oldtext") || $el.text(), | |
txt, cutoff; | |
if ($el.attr("oldtext")) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pyquery import PyQuery as pq | |
import re | |
import os | |
import time | |
HUDSON_URL = 'https://hudson.mozilla.org/job/amo-master/lastBuild/' | |
old_status = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MILESTONE='5.12.9' | |
ASSIGNEDTO='[email protected]' | |
PRODUCT='addons.mozilla.org' | |
BUGZILLA='https://bugzilla.mozilla.org/show_bug.cgi?id=' | |
QUERY="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=$ASSIGNEDTO&emailassigned_to1=1&emailtype1=exact&product=$PRODUCT&query_format=advanced&order=Assignee&target_milestone=$MILESTONE&ctype=csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $1 ]]; then | |
ack "TODO\s?\($1\)" | |
else | |
ack --noheading "TODO\s?\(([^\)]+)\)" --output='$1' -h | sort -f | uniq -ic | sort -r | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("localhost") { | |
html { | |
margin-top: 129px !important; | |
padding-bottom: 260px !important; | |
} | |
body { | |
width: 320px; | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: `git url` or `git url <commitish>` | |
# | |
# * copies the commit's github url to your clipboard | |
# * prints out the log message | |
# * opens the bugzilla page if it found a bug number | |
# | |
# Set up the github url with `git config github.url <url>`. | |
# Only for the Mac. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The sample rate of your audio playback; | |
const RATE = 44100; | |
// Magic number! | |
var Hz = 2 * Math.PI / RATE; | |
// Frequencies of some notes | |
var freqTable = [16.35,17.32,18.35,19.45,20.6,21.83,23.12,24.5,25.96, | |
27.5,29.14,30.87,32.7,34.65,36.71,38.89,41.2,43.65,46.25,49,51.91,55,58.27, | |
61.74,65.41,69.3,73.42,77.78,82.41,87.31,92.5,98,103.83,110,116.54,123.47, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gist-highlight { | |
border-left: 3ex solid #eee; | |
position: relative; | |
} | |
.gist-highlight pre { | |
counter-reset: linenumbers; | |
} | |
.gist-highlight pre div:before { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
OlderNewer