Skip to content

Instantly share code, notes, and snippets.

View dcolascione's full-sized avatar

Daniel Colascione dcolascione

View GitHub Profile
@dcolascione
dcolascione / gist:2553576
Created April 29, 2012 22:33
why doesn't paredit already do this?
(require 'cl)
(defun qtmstr-lisp-newline ()
(when (save-excursion
(save-restriction
(narrow-to-region (point-min) (point))
(beginning-of-line)
(looking-at "^\\( *;+ *\\)")))
(let ((prefix (match-string 1)))
(delete-horizontal-space)
@dcolascione
dcolascione / lenovo-input-conf.sh
Created November 3, 2013 23:01
The beauty of desktop Linux is that I can write shell scripts like this. The horror is realizing I shouldn't have to.
#!/bin/bash
# This script runs on login and on device hotplug and configures
# various bits of my Lenovo laptop. It automatically detects whether
# the machine is docked.
# Profiles:
# -1 = None
# 0 = legacy behavior: if thresh is 0, polynomial,
# otherwise, simple.
# 1 = device-dependent