Skip to content

Instantly share code, notes, and snippets.

View UnwashedMeme's full-sized avatar

Nathan Bird UnwashedMeme

View GitHub Profile
#!/bin/bash
#read from emacs server file what port it is currently listening on
PORT=`egrep -o '127.0.0.1:([0-9]*)' ~/.emacs.d/server/server | sed 's/127.0.0.1://'`
HOST="${@: -1}"
echo "Found host '$HOST'"
ssh "$HOST" "mkdir -m 700 -p ~/.emacs.d/server"
scp -p ~/.emacs.d/server/server $HOST:.emacs.d/server/server
;;; vcl-mode.el - Syntax highlighting for Varnish Command Language
;;;
;;; Copyright (c) 2008-2009 Linpro AS
;;; All rights reserved.
;;;
;;; Author: Stig Sandbeck Mathisen <ssm@linpro.no>
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
@UnwashedMeme
UnwashedMeme / automount-swaps.conf
Last active December 14, 2015 04:59
Upstart task to scan for and activate any block devices with type swap; based on blkid.
# automount-swaps scans for any block devices with type swap (as
# identified by blkid) and activates them with swapon.
#
description "Automount swap devices"
start on all-swaps #generated by mountall
task
@UnwashedMeme
UnwashedMeme / mypylint.el
Last active December 17, 2015 14:09
flymake-python-pyflakes customization

flymake-python-pyflakes

What will we get

Python buffers (that aren't tramp remote) will be highlighted by pyflakes and pep8. They have 'questionable' lines highlighted and error lines significantly highlighted. When you move the cursor into that section it should print the error message in the minibuffer; if there are two errors it

@UnwashedMeme
UnwashedMeme / gist:9167d7ad7421c0d34609
Created May 22, 2014 17:43
js2-additional-externs
(defun um-js-additional-externs ()
(let ((jshintrc (expand-file-name ".jshintrc"
(locate-dominating-file
default-directory ".jshintrc"))))
(when (file-readable-p jshintrc)
(message "Using jshintrc file: %s" jshintrc)
(let ((jshintrc-data (json-read-file jshintrc)))
(setq js2-additional-externs
(union js2-additional-externs
(mapcar #'symbol-name
@UnwashedMeme
UnwashedMeme / gist:8dd446062a5da005bace
Last active August 29, 2015 14:13
toBeCloseToArray for jasmine 2
beforeEach(function() {
jasmine.addMatchers({
toBeCloseToArray: function(util, customEqualityTesters) {
return {
compare: function(actual, expected, precision) {
if (precision !== 0) {
precision = precision || 2;
}
var i;
return {
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'