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| #! /usr/bin/pythonw | |
| # | |
| # Modified by Michael Bianco <[email protected]> on June 26, 2009 | |
| # Written by Thomas Pan at January 21, 2007 | |
| # mysql2graffle for Omnigraffle 5 is based on | |
| # MyDBGraffle for OmniGraffle 4 which is based on Paul Davis' work at http://www.visualdistortion.org | |
| # | |
| # Requires: | |
| # | |
| # OmniGraffle 5 |
| #!/usr/bin/env ruby | |
| # rubycocoa | |
| require 'osx/cocoa' | |
| include OSX | |
| OSX.require_framework 'ScriptingBridge' | |
| class GraffleConverter | |
| def initialize | |
| @graffle = SBApplication.applicationWithBundleIdentifier_("com.omnigroup.OmniGraffle") |
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| /* */ | |
| /* Simple node js module to get distance between two coordinates. */ | |
| /* */ | |
| /* Code transformed from Chris Veness example code - please refer to his website for licensing */ | |
| /* questions. */ | |
| /* */ | |
| /* */ | |
| /* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2011 */ | |
| /* - www.movable-type.co.uk/scripts/latlong.html */ |
| /*jslint onevar: false, plusplus: false */ | |
| /* | |
| JS Beautifier | |
| --------------- | |
| Written by Einar Lielmanis, <[email protected]> | |
| http://jsbeautifier.org/ |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| // Encrypt where jo is input, and query is output and ENCRPYTION_KEy is key | |
| byte[] input = jo.toString().getBytes("utf-8"); | |
| MessageDigest md = MessageDigest.getInstance("MD5"); | |
| byte[] thedigest = md.digest(ENCRYPTION_KEY.getBytes("UTF-8")); | |
| SecretKeySpec skc = new SecretKeySpec(thedigest, "AES/ECB/PKCS5Padding"); | |
| Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); | |
| cipher.init(Cipher.ENCRYPT_MODE, skc); | |
| byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; |
| var router, middlewares, before, after, app | |
| app = express() | |
| router = require('./router') | |
| app.configure(function(){ | |
| app.set('controllers', require('YOUR_CONTROLLERS')) | |
| }) | |
| middlewares = { |
| -- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group | |
| -- http://www.postgresql.jp/document/9.2/html/tutorial-window.html | |
| CREATE TABLE empsalary ( | |
| depname varchar(10) not null | |
| , empno integer not null | |
| , salary integer not null | |
| ); | |
| INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200); |
| var gameId = 7; | |
| async.auto({ | |
| game: Game.find(gameId).done, | |
| reviews: Review.findAllByGameId(gameId).done | |
| }, function (err, results) { | |
| var response = { | |
| id: results.game.id, |