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
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.2 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http*://* | |
// ==/UserScript== |
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
$audience = new Zend_Form_Element_MultiCheckbox('audience', array( | |
'label' => 'Target Audience', | |
'required' => true, | |
'multiOptions' => array( | |
'students' => 'Students', | |
'faculty' => 'Faculty', | |
'staff' => 'Staff', | |
'stustaf' => 'Student Employees', | |
'retiree' => 'Emeritus/Retiree'), | |
'validators' => array( |
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 API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
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 | |
"""Command line script to convert a file, usually an image, into a data URI | |
for use on the web.""" | |
import base64 | |
import mimetypes | |
import os | |
import sys | |
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
from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
class DomHelper(object): | |
driver = None | |
waiter = None | |
def open_page(self, url): | |
self.driver.get(url) |
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
// `promise` is some operation that may succeed (fulfill) or fail (reject) | |
var newPromise = promise.then( | |
function () { | |
return delay(1000); | |
}, | |
writeError | |
); | |
// If `promise` fulfills, `newPromise` will fulfill in 1000 ms. | |
// If `promise` rejects and writing to the error log succeeds, |
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
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
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
@echo off | |
echo This script creates issue labels for a GitHub repository | |
echo. | |
echo Please specify the GitHub Profile containing the Repository, e.g.: | |
echo https://github.com/MyProfile/MyCoolProject | |
echo ~~~~~~~~~ | |
set /p username=" Enter Profile : " | |
echo. | |
echo Please specify the GitHub password for that profile: | |
set /p password=" Enter Password : " |
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 | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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/bash | |
# | |
# Notify of Homebrew updates via Notification Center on Mac OS X | |
# | |
# Author: Chris Streeter http://www.chrisstreeter.com | |
# Requires: terminal-notifier. Install with: | |
# gem install terminal-notifier | |
TERM_APP='/Applications/Terminal.app' | |
BREW_EXEC='/usr/local/bin/brew' |
OlderNewer