A dotjs script to add some color to Bugzilla.
It's The Worst!™
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 |
A dotjs script to add some color to Bugzilla.
It's The Worst!™
<!-- before --> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
</p> | |
<!-- after --> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim | |
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea |
#!/bin/zsh | |
NUM=`ls migrations | sort -n | tail -n1 | awk -F- '{print $1}'` | |
NUM=$(($NUM+1)) | |
echo "$NUM-$1.sql" |
g=$(ps -ex | grep Growl | grep -v grep) | |
if [ -z "$g" ] # Growl isn't running | |
then | |
echo "starting Growl..." | |
/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp& | |
else | |
echo "stopping Growl..." | |
ps -ex | grep Growl | grep -v grep | awk '{print $1}' | xargs kill | |
fi | |
ps -ex | grep Growl | grep -v grep |
function bezzy() { | |
var pts = Array.prototype.slice.call(arguments), | |
funcs = []; | |
function b1(p1, p2) { | |
return function(t) { | |
var i = 1 - t; | |
return [p1[0]*i+p2[0]*t, p1[1]*i+p2[1]*t]; | |
} | |
} | |
function b2(p1, p2, p3) { |
;;;;;;;;;;;;;;;;;;;;;;;;;;var n = ~~(Math.random() * 9 - 4);;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;function sign(n) {;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;return n && 1 + 2 * -(n < 0);;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;function sign2(n) {;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;return n && Math.abs(n) / n;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
// manage a webapp. | |
// place <link rel="app-manifest" href="path-to-manifest.webapp"> in your <head> | |
// mozApp.install() attempts installation | |
// mozApp.uninstall() removes | |
// mozApp.isRunning() indicates whether the app is currently installed and open | |
var mozApp = (function() { | |
var manLink = document.querySelector('link[rel="app-manifest"]'), | |
manifestURL = manLink.href; | |
var self = false; |
install the dotjs extension:
var searchForm = $('#search-form'), | |
searchEl = $('#search'), | |
nav = $('#tabs'), | |
fields = 'id,assigned_to,priority,summary,status,last_change_time,whiteboard', | |
fieldsPretty = { | |
'assigned_to': 'assigned to', | |
'last_change_time': 'changed' | |
}, | |
sortField = localStorage['sort-field'] || 'last_change_time', | |
sortDirection = localStorage['sort-direction'] === 'true', |