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
;; Simple Emacs utility function to lookup Unity API references by Shane Celis. | |
(defun unity-api-lookup (string) | |
"Opens up a browser to Google's first hit for the search string 'unity api reference ' plus your search term." | |
(interactive (list | |
(read-string "Look up Unity API reference for: " | |
(thing-at-point 'word) 'unity-api-lookup-history))) | |
(browse-url (concat "http://www.google.com/search?btnI&q=" | |
(url-hexify-string | |
(concat "unity api reference " string))))) |
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 dired-open-by-macosx () | |
"Opens a file in dired with the Mac OS X command 'open'." | |
(interactive) | |
(shell-command (concat "open " (shell-quote-argument (expand-file-name (dired-file-name-at-point)))))) | |
(define-key dired-mode-map (kbd "O") 'dired-open-by-macosx) |
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
;;; minimap.el --- Sidebar showing a "mini-map" of a buffer | |
;; Copyright (C) 2009-2014 Free Software Foundation, Inc. | |
;; Author: David Engster <deng@randomsample.de> | |
;; Keywords: | |
;; Version: 1.2 | |
;; This file is 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
#include "keymap_common.h" | |
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* Classic | |
http://www.keyboard-layout-editor.com/#/layouts/46aa7b0762cb7a535eaaf1e49644398f | |
*/ | |
/* 0: main layer */ | |
/* XXX Not sure about what goes in the top left and bottom left position: placing ESC and RSFT there for now. */ | |
KEYMAP( ESC, Q, W, E, R, T, Y, U, I, O, P, TAB, \ | |
LCTL, A, S, D, F, G, H, J, K, L, SCLN, BSPC, \ |
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
{-# LANGUAGE OverloadedStrings #-} | |
{- Basic strategy to match patterns that are either '^word$' or | |
'^word[a-z\']*$': Use two tries. | |
Case 1 to match '^word$' is covered by constructing a trie and then | |
running through the data. | |
Case 2 to match '^word[a-z\']*' is covered by constructing another | |
trie with the prefix 'word' and then using a regex on the after the | |
prefix has been found. This code doesn't cover it because of an API |
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
#!/bin/bash | |
# timelapse | |
# | |
# Records a sequence of screencaptures at regular intervals on Mac OS | |
# X. Can also record using webcam if you have isightcapture | |
# installed. | |
# | |
# http://www.intergalactic.de/pages/iSight.html | |
# | |
# Shane Celis |
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
#!/bin/bash | |
# compete | |
if [ $# -eq 0 ]; then | |
echo "usage: compete <n> <classnames(s)>" >&2; | |
echo " n number of rounds" >&2; | |
echo "creates a CSV output for the competition.">&2; | |
exit 2; | |
fi |
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
#!/bin/bash | |
# mycompete | |
if [ $# -eq 0 ]; then | |
echo "usage: compete <n> <player1-classname> <player2-classnames(s)>" >&2; | |
echo " n number of rounds for p1 vs. p2 and p2 vs. p1 (so 2n rounds total)" >&2; | |
echo "creates a CSV output for the competition.">&2; | |
exit 2; | |
fi |
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
#!/usr/bin/env ruby | |
# parse-kevin | |
if ARGV.length != 2 then | |
puts "usage: parse-kevin <listen-for> <input>" | |
exit(1) | |
end | |
pattern = ARGV[0] | |
infile = File.new(ARGV[1], "r") | |
readingRightListen = false |
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
;;; pastels-on-dark-theme.el --- Pastels on Dark theme for Emacs 24 | |
;; Author: Mats Persson | |
;; Maintainer: Shane Celis <shane (at) gnufoo (dot) org> | |
;; URL: http://gist.github.com/1906662 | |
;; Version: 0.3 | |
;; Keywords: theme, color | |
;;; Commentary: |
OlderNewer