Skip to content

Instantly share code, notes, and snippets.

Avatar

Colin Gourlay colingourlay

View GitHub Profile
View app.js
require('jimi').run({
url_conf: require('./urls')
});
View Trac Timeline User Filter
javascript:%20(function(){if(typeof%20jQuery!='undefined'){return%20run();}else{function%20getScript(url,callback){var%20script=document.createElement('script');script.src=url;var%20head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;callback();script.onload=script.onreadystatechange=null;head.removeChild(script);}};head.appendChild(script);}getScript('http://code.jquery.com/jquery-latest.min.js',function%20(){return%20run();});}function%20run(){if(typeof%20jQuery!='undefined'){$jq=jQuery.noConflict();$jq('#banner').remove();$jq('#mainnav').remove();$jq('#ctxnav').remove();$jq('#prefs').remove();$jq('#altlinks').remove();$jq('#footer').remove();$jq('dt').each(function%20(){if($jq(this).find(':contains("cgourlay")').length==0){$jq(this).next().remove();}else{$jq(this).next().css('font-size','120%');}$jq(this).remove();});$jq('dd.wiki').remove();}}})();
View Unwrapped Trac Timeline User Filter
(function() {
if (typeof jQuery != 'undefined') {
return run();
} else {
function getScript(url, callback) {
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0],
done = false;
script.onload = script.onreadystatechange = function() {
View frak.html
<div class="frak">
<div class="half">
Left Column
</div>
<div class="half">
Right Column
</div>
</div>
View nested-frak.html
<div class="frak">
<div class="quarter x3 frak">
<div class="third">Column A</div>
<div class="third">Column B</div>
<div class="third">Column C</div>
</div>
<div class="quarter">Sidebar</div>
</div>
View fraction-choice.html
<div class="frak">
<div class="sixth">Column A</div>
<div class="sixth x4">Column B</div>
<div class="sixth">Column C</div>
</div>
<div class="frak">
<div class="sixth">Column A</div>
<div class="third x2">Column B</div>
<div class="sixth">Column C</div>
</div>
View loadSubscribedArticles.js
var lsaCall = [0];
function loadSubscribedArticles(i, tag, Author) {
var int,
self = this;
console.log("called with i=" + i);
if (typeof lsaCall[i] === "undefined" || lsaCall[i] === 0) {
console.log("first-time block ran");
lsaCall[i] = 1;
View gist:1321283
function runsite {
if [ -z "$2" ]; then
echo usage: runsite [network] [site_id] mobile?
else
if [ -n "$3" ]; then
PORT=$[9000+$2]
CMD=$1_$3
else
PORT=$[8000+$2]
CMD=$1
View gist:1958226
(function (w) {
// Define two queues for handlers
w.readyQ = [];
w.bindReadyQ = [];
// Define the fake jQuery function to capture handlers
w.$ = w.jQuery = function (handler) {
// Push a handler into the correct queue
@colingourlay
colingourlay / node-and-npm-in-30-seconds.sh
Created Mar 5, 2012 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh