Skip to content

Instantly share code, notes, and snippets.

@trishume
trishume / .slate
Created October 5, 2012 19:03
My Slate config, requires my window hint icon patch.
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout dvorak
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
# All bindings refer to the current screen.
config defaultToCurrentScreen true
# Nudge/resize commands refer to % of screen sice.
config nudgePercentOf screenSize
config resizePercentOf screenSize
# my old divvy bindings (might wanna replace these some day?)
# corners: q/e/z/c for nw/ne/sw/se, quarter screen
alias resize-quarter resize:screenSizeX/2;screenSizeY/2
# settings {{{
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
alias gridSize 8,8
alias c (screenSizeX/8)
alias r (screenSizeY/8)
#}}}
@raecoo
raecoo / Upgrade Postgres 9.1 to 9.2
Created December 22, 2012 02:10
Upgrade Postgres 9.1 to 9.2
cd /usr/local/var
mkdir postgres9.2
# Initialize a the new postgres 9.2 database
initdb /usr/local/var/postgres9.2
# Tell postgres we are upgrading the existing postgres database to the new postgres9.2 location
pg_upgrade -d /usr/local/var/postgres/ -D /usr/local/var/postgres9.2 -b /usr/local/Cellar/postgresql/9.1.4/bin/ -B /usr/local/Cellar/postgresql/9.2.1/bin/ -v
# Swap the folders
@rboyd
rboyd / .slate
Created January 2, 2013 06:33
slate config
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
# bind right:alt resize +10% +0
# bind left:alt resize -10% +0
@mgax
mgax / .slate
Last active December 11, 2015 07:49
config secondsBeforeRepeat 0.05
config secondsBetweenRepeat 0.05
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
//**********************************
// ヘルパー
//**********************************
var resize = function (width, height, anchor) {
if (typeof anchor === 'undefined') anchor = 'top-left';
return slate.operation('resize', {
'width' : width,
'height' : height,
@mkuklis
mkuklis / gist:4712839
Last active December 12, 2015 04:18
requirejs+flight
// requirejs config in main.js
require.config({
paths: {
jquery: 'components/jquery/jquery',
es5shim: 'components/es5-shim/es5-shim',
es5sham: 'components/es5-shim/es5-sham'
},
map: {
'*': {
'flight/component': 'components/flight/lib/component',
@ericbmerritt
ericbmerritt / Makefile
Last active August 11, 2023 09:35
Universal drop in Makefile for Erlang projects that use rebar
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
defrecord Poker.Card, face: 0, suit: "" do
def value(record) do
case record.face do
"A" -> 14
"K" -> 13
"Q" -> 12
"J" -> 11
"T" -> 10
int -> int