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
# See https://github.com/jigish/slate#readme | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config focusPreferSameApp false | |
config focusCheckWidthMax 3000 | |
config checkDefaultsOnLoad true | |
config windowHintsShowIcons true | |
config windowHintsSpread true |
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
# Based on https://gist.github.com/1182136 | |
class BootstrapLinkRenderer < ::WillPaginate::ActionView::LinkRenderer | |
protected | |
def html_container(html) | |
tag :div, tag(:ul, html), container_attributes | |
end | |
def page_number(page) | |
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page) |
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
This code now lives in its own repo at https://github.com/purcell/postgresql-migrations |
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
module Puzzle where | |
import Data.List (permutations) | |
import Control.Monad (guard) | |
solution = do | |
[a,b,c,d,e,f] <- permutations "123456" | |
guard $ multiple 6 [a,b,c,d,e,f] | |
guard $ multiple 5 [a,b,c,d,e] | |
guard $ multiple 4 [a,b,c,d] |
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
module Main where | |
import Text.Parsec | |
import Text.Parsec.String | |
main :: IO () | |
main = do | |
input <- getLine |
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
(defun elpa/package-names (archive-name) | |
(let* ((archive-contents (expand-file-name (concat "archives/" archive-name "/archive-contents") | |
package-user-dir)) | |
(names (mapcar 'car (rest (pb/read-from-file archive-contents))))) | |
(sort names 'string<))) | |
(defun list-minus (a b) | |
(let ((result (copy-seq a))) | |
(dolist (e b) | |
(delq e result)) |
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
;;; no-proxy-mode.el --- Temporarily disable built-in proxy settings | |
;; Copyright (C) 2013 by Sachin Patil | |
;; Author: Sachin Patil <isachin@iitb.ac.in> | |
;; URL: http://github.com/psachin/proxy-mode | |
;; Keywords: network, proxy, tool, convenience | |
;; Version: 0.9 | |
;; This file is NOT a part of GNU Emacs. |
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
;;; proxy-mode.el --- Provides proxy minor mode. | |
;; Copyright (C) 2013 by Sachin Patil | |
;; Author: Sachin Patil <isachin@iitb.ac.in> | |
;; URL: http://github.com/psachin/proxy-mode | |
;; Keywords: network, proxy, tool, convenience | |
;; Version: 0.9 | |
;; This file is NOT a part of GNU Emacs. |
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
Compiling file /Users/steve/.emacs.d/elpa/ensime-20130904.40/ensime-auto-complete.el at Thu Oct 17 13:49:57 2013 | |
Entering directory `/Users/steve/.emacs.d/elpa/ensime-20130904.40/' | |
In ensime-ac-complete-action: | |
ensime-auto-complete.el:148:11:Warning: reference to free variable `candidate' | |
In ensime-ac-enable: | |
ensime-auto-complete.el:322:15:Warning: assignment to free variable | |
`ac-delete-dups' |
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
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config focusPreferSameApp false | |
config focusCheckWidthMax 3000 | |
config checkDefaultsOnLoad true | |
alias air 1440x900 | |
alias dell 2560x1440 |