Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Colascione dcolascione

View GitHub Profile
@dcolascione
dcolascione / lenovo-input-conf.sh
Created Nov 3, 2013
The beauty of desktop Linux is that I can write shell scripts like this. The horror is realizing I shouldn't have to.
View lenovo-input-conf.sh
#!/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
@dcolascione
dcolascione / gist:2553576
Created Apr 29, 2012
why doesn't paredit already do this?
View gist:2553576
(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)