Skip to content

Instantly share code, notes, and snippets.

View q0rban's full-sized avatar
👋

James Sansbury q0rban

👋
View GitHub Profile
@q0rban
q0rban / Starter Drush Make
Created July 28, 2010 17:53
Sample Drush Makefile
core = 6.x
projects[pressflow][type] = "core"
projects[pressflow][download][type] = "get"
projects[pressflow][download][url] = "http://lb.cm/pressflow6"
; INSTALL PROFILES
projects[profiler] = 2.0beta1
; DEVELOPMENT
This space is intentionally left blank.
@q0rban
q0rban / yammer.css
Created October 20, 2011 14:16
Fluid Userstyle for Yammer
#uni-header,
div.page-content.two-column-layout,
#column-two {
width: 780px !important;
}
body,
div.page-content.two-column-layout,
div.page-content.three-column-layout {
background: none !important;
@q0rban
q0rban / gist:1320043
Created October 27, 2011 16:24
PHP Script for Coda to wrap to 80 Chars
#! /usr/bin/php
<?php
$string = getenv('CODA_SELECTED_TEXT');
function gimmee_spaces($length) {
return str_pad('', $length);
}
$length = strlen($string);
$cut = ltrim($string, " \t");
@q0rban
q0rban / varnishreload.sh
Created January 8, 2012 15:38
Varnish Reload VCL Script
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol
FILE="/etc/varnish/ugc.vcl"
# Hostname and management port
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
NOW=`date +%s`
@q0rban
q0rban / varnishcli.sh
Created January 8, 2012 15:40
Varnish script to connect to the CLI
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
SECRET='/etc/varnish/secret'
varnishadm -T $HOSTPORT -S $SECRET
@q0rban
q0rban / yammer.js
Last active September 29, 2015 21:27
Fluid Userscript for Yammer
// ==UserScript==
// @name fluid-dock-badge
// @namespace http://fluidapp.com
// @description Dock badge for unread messages on Yammer.com
// @include *
// @author Joe Shindelar (eojthebrave)
// ==/UserScript==
(function ($) {
if (window.fluid) {
setInterval(dockBadge, 5000);
@q0rban
q0rban / Ascii Bot
Created March 15, 2012 15:09 — forked from vordude/Ascii Bot
o
_ | _
| ◡ ◡ |
| ⏝ |
— ‾‾‾‾‾ —
| |
| | | |
@q0rban
q0rban / 01.js
Created April 10, 2012 14:43 — forked from sirkitree/01.js
Project Euler challenge #1
// Project Euler challenge #1
// https://projecteuler.net/problem=1
var ans = 0;
for (i = 1; i < 1000; i++) {
if (i % 3 === 0 || i % 5 === 0) {
ans += i;
}
}
console.log(ans);