Skip to content

Instantly share code, notes, and snippets.

View camdez's full-sized avatar

Cameron Desautels camdez

View GitHub Profile
@camdez
camdez / keybase.md
Created October 3, 2014 16:52
Keybase Proof

Keybase proof

I hereby claim:

  • I am camdez on github.
  • I am camdez (https://keybase.io/camdez) on keybase.
  • I have a public key whose fingerprint is B1E0 96BD CB39 F149 BB10 6638 4A32 D989 2422 82E9

To claim this, I am signing this object:

(eval-after-load 'projectile
'(add-hook 'find-file-hook 'camdez/warn-if-longhorn-version))
(defun camdez/warn-if-longhorn-version ()
(interactive)
(when (projectile-project-p)
(let* ((file-name (buffer-file-name))
(project-dir (projectile-project-root))
(views-dir (concat project-dir "app/views/"))
(lh-views-dir (concat project-dir "app/longhorn_views/")))
@camdez
camdez / experimental.el
Last active August 29, 2015 14:17
Add new Emacs experiment
(defun camdez/add-experiment ()
(interactive)
(find-file camdez/experiments-file)
(goto-char (point-min))
(re-search-forward ";;; Code:")
(insert "\n\n")
(camdez/lisp-insert-hr)
(insert ";; ")
(insert-date-and-time)
(insert "\n\n"))
@camdez
camdez / experimental.el
Created May 6, 2015 16:02
Play sound in Emacs when mark is pushed. Interesting for discovering which commands push mark. (If not using OS X, insert appropriate sound file path.)
;; $ ls /System/Library/Sounds/
;; Basso.aiff Bottle.aiff Funk.aiff Hero.aiff Ping.aiff Purr.aiff Submarine.aiff
;; Blow.aiff Frog.aiff Glass.aiff Morse.aiff Pop.aiff Sosumi.aiff Tink.aiff
(defun camdez/push-mark--play-sound (&optional location nomsg activate)
(play-sound-file "/System/Library/Sounds/Pop.aiff" 20))
(advice-add 'push-mark :after #'camdez/push-mark--play-sound)
@camdez
camdez / pairs.org
Last active August 29, 2015 14:21
Pairing Sessions

Remote Pairing Sessions

I’m open to pairing programming with anyone on anything. I’m interested in exposure to other people’s coding / problem solving styles, and I’m happy to share what I know. Need another pair of eyes on something? Leave a comment below, or email me at camdez@gmail.com.

WhenWhoWhatWith
@camdez
camdez / breaktime.el
Last active August 29, 2015 14:28
/u/joeheyming's Emacs break timer (modified)
;;; See: https://www.reddit.com/r/emacs/comments/3icpo7/take_a_break_every_3_hours/
(defvar breaktime-timer nil
"Holds the running break timer (if any).")
(defvar breaktime-interval (* 3 60 60)
"How often to take a break, in seconds.")
(defun breaktime--take-a-break ()
(interactive)
(switch-to-buffer (get-buffer-create "*breaktime*"))
(let ((inhibit-read-only t))
@camdez
camdez / whiteout.sh
Created February 13, 2012 18:15
whiteout.sh - Clean up the whitespace in a file
#!/bin/bash
# whiteout.sh - Clean up the whitespace in a file
#
# Author: Cameron Desautels <camdez@gmail.com>
# Date: 2012-02-12 20:25:08
if [ -z "$1" ]
then
echo "Usage: `basename $0` file [...]" 1>&2
exit 1
@camdez
camdez / gist:2844754
Last active October 5, 2015 17:28
OrgSync API: Accounts: Show Single Account
{
"about_me": "I love politics, art museums, and soccer.",
"address": "3308 Red River Apt 106",
"city": "Austin",
"first_name": "Amy",
"last_login": "2011-08-05T18:53:07Z",
"id": 1918,
"state": "TX",
"country": "US",
"last_name": "Tallon",
@camdez
camdez / gist:2846393
Last active October 5, 2015 17:47
OrgSync API: Accounts: List All Accounts
[
{
"about_me": "I love gardening, but I especially enjoy taking care of flowers such as tulips, my favorite!",
"address": "3308 Red River Apt 106",
"city": "Austin",
"last_login": "2011-05-13T15:38:11Z",
"username": "demo",
"id": 1834,
"phone_number": "214-682-0000",
"last_name": "Williams",
@camdez
camdez / gist:2846639
Last active October 5, 2015 17:47
OrgSync API: Accounts: Update Account
{
"org_ids": [19, 225, (...)],
"about_me": "I love politics, art museums, and soccer.",
"address": "3308 Red River Apt 106",
"city": "Austin",
"last_login": "2011-08-05T13:53:07Z",
"username": "demo_user_0007",
"id": 1918,
"profile_responses": [
{