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
/* | |
* TypeHelpers version 1.0 | |
* Zoltan Hawryluk, Nov 24 2009. | |
* @see http://www.useragentman.com/blog/2009/11/29/how-to-detect-font-smoothing-using-javascript/ | |
* | |
* Released under the MIT License. http://www.opensource.org/licenses/mit-license.php | |
* | |
* Works for | |
* - IE6+ (Windows), | |
* - Firefox 3.5+ (Windows, Mac, Linux), |
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
// If you're a glutton for punishment, and/or claim | |
// that JavaScript libraries have too much "bloat", | |
// use this to force yourself to write JS longhand. | |
(function(window) { | |
function screwed() { | |
window._ = null; | |
window.$ = null; | |
window.$A = null; | |
window.$F = null; |
/* 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'); |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
/* by Joder Illi, Snowball mailing list */ | |
function stemm(word) { | |
/* | |
Put u and y between vowels into upper case | |
*/ | |
word = word.replace(/([aeiouyäöü])u([aeiouyäöü])/g, '$1U$2'); | |
word = word.replace(/([aeiouyäöü])y([aeiouyäöü])/g, '$1Y$2'); | |
/* | |
and then do the following mappings, |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
page.includeJs("http://www.google.com/jsapi?key=AIzaSyA5m1Nc8ws2BbmPRwKu5gFradvD_hgq6G0", function() { | |
page.evaluate(function() { | |
google.load("feeds", "1"); | |
var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml"); | |
feed.includeHistoricalEntries(); // tell the API we want to have old entries too | |
feed.setNumEntries(250); // we want a maximum of 250 entries, if they exist | |
feed.load(); | |
#!/bin/bash | |
# | |
# Originally from "Automatically download Chromium nightly builds" | |
# http://top-frog.com/2010/05/29/automatically-download-chromium-nightly-builds/ | |
LATEST=`curl -s http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/LAST_CHANGE` | |
CURRENT=`defaults read /Applications/Chromium.app/Contents/Info SVNRevision 2>/dev/null` | |
PROCESSID=`ps ux | awk '/Chromium/ && !/awk/ {print $2}'` | |
if [[ $LATEST -eq $CURRENT ]]; then |