most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
#!/bin/bash | |
# | |
# Home-rolled Smush.it, by Alex Dunae (http://dialect.ca). | |
# | |
# N.B. This script works for me; it may not work for you. | |
# Since it overwrites your images with the optimized version, you should | |
# backup your files before running this script and do a trial run before | |
# getting too excited. This is your disclaimer. | |
# | |
# Uses jpegtran (http://jpegclub.org/jpegtran/), part of libjpeg, |
// find out what prefix this browser supports. | |
// usage: gimmePrefix('transform') // 'WebkitTransform' | |
// returns false if unsupported. | |
function gimmePrefix(prop){ | |
var prefixes = ['Moz','Khtml','Webkit','O','ms'], | |
elem = document.createElement('div'), | |
upper = prop.charAt(0).toUpperCase() + prop.slice(1); |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
mime = require("mime") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname |
<script> | |
/* | |
A div with an id of 'slideshow' contains five images, the first of which is shown and the others are hidden using | |
a display style of none. Using JavaScript, create a simple slideshow that cycles through the images, displaying | |
each image for three seconds at a time, looping back to the first image when the end is reached. You cannot use | |
jQuery or any other library. | |
*/ | |
(function() { | |
var images = document.getElementById("slideshow").getElementsByTagName("img"); | |
var currentIndex = 0; |
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
/** | |
add ability to load json fixtures into jasmine | |
**/ | |
var readJsonFixtures = function() { | |
return jasmine.getJsonFixtures().proxyCallTo_('read', arguments); | |
}; | |
var preloadJsonFixtures = function() { | |
jasmine.getJsonFixtures().proxyCallTo_('preload', arguments); |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
<!--[if !IE]><!--> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
<!--<![endif]--> | |
<!--[if lte IE 8]> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<![endif]--> | |
<!--[if gt IE 8]> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> |
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:[email protected]/share_name share_name/ |