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
;(use-package noflet :ensure t) | |
(provide 'auto-recover-mode) | |
(define-minor-mode auto-recover-mode | |
"more documentation" | |
:global t | |
(if auto-recover-mode | |
(progn | |
(advice-add 'after-find-file :around #'auto-recover-mode/after-find-file-no-warn) | |
(advice-add 'recover-this-file :around #'auto-recover-mode/always-yes) |
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
// set up flags for the buttons | |
#define b1 B0000001 | |
#define b2 B0000010 | |
#define b3 B0000100 | |
#define b4 B0001000 | |
#define b5 B0010000 | |
#define b6 B0100000 | |
#define b7 B1000000 | |
// make pin numbers easier to notice |
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
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Diagnostics" #> | |
<# #if false | |
* WTF |
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/sh | |
SSID="YOUR WIRELESS SSID" | |
REMOTE_LOCATION="rsync://SERVER/module" | |
# wake up. Not sure if this is neccessary | |
# will error if already awake | |
lipc-set-prop com.lab126.powerd wakeUp 1 | |
# start wireless |
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 mbg/devenv-compile nil | |
"Set up compile command for Visual Studio" | |
(interactive) | |
(let ((vsvars (shell-quote-argument "C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\Tools\\vsvars32.bat")) | |
(solution-file (shell-quote-argument | |
;; awesomely, locate-dominating-file returns the directory for the file | |
;; so when you use a pattern to find a file, you need to run it again in | |
;; the directory itself to get the file name. Who knew. | |
(car (directory-files | |
(locate-dominating-file default-directory |
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 | |
require 'sqlite3' | |
require 'date' | |
require 'optparse' | |
require 'iconv' unless String.method_defined?(:encode) # needed to fix dodgy encoding in files (String#encode is Ruby 1.9+) | |
CONFIG = { | |
:db_name => 'wc.db', | |
:base => '.', | |
:ignore_regexp => /^\s*(#|\*)/, |
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 warn-unique () | |
"Inserts a warn statement with an incrementing buffer local id" | |
(interactive nil) | |
(if (not (boundp 'warn-unique-count)) | |
(set (make-local-variable 'warn-unique-count) 0) | |
(set 'warn-unique-count (+ 1 warn-unique-count))) | |
(end-of-line) | |
(newline-and-indent) | |
(insert (concat "warn '**** " (number-to-string warn-unique-count) "';"))) |
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 python | |
import argparse | |
import subprocess,errno | |
import os,sys | |
import fileinput | |
MAILBOX_MAP = '{{ virtual_mailbox_maps }}' | |
ALIAS_MAP = '{{ virtual_alias_maps }}' | |
USER_FILE = '{{ users_file }}' |
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
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> | |
<os:ShortName>google-grumpy</os:ShortName> | |
<os:Description>Google (ssl,always show tools,verbatim,no instant)</os:Description> | |
<os:InputEncoding>UTF-8</os:InputEncoding> | |
<os:Image width="16" height="16"> | |
data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7PT7/3zF6/9Ptu//RbHx/0227/+Tzvb/9vv5/97h0f9JeBz/NHoA/z98Av9AfAD/PHsA/0F6AP8AAAAA/vz7/1+33/8Mp+z/FrHw/xWy8f8bs/T/Hqrx/3zE7v////7/t8qp/zF2A/87gwH/P4ID/z59AP8+egD/Q3kA/97s8v8botj/ELn3/wy58f8PtfL/D7Lw/xuz9P8vq+f/8/n///779v9KhR3/OYYA/0GFAv88hgD/QIAC/z17AP/0+/j/N6bM/wC07/8Cxf7/CsP7/wm+9v8Aqur/SrDb//7+/v///P7/VZEl/zSJAP87jQD/PYYA/0OBBf8+fQH///3//9Dp8/84sM7/CrDf/wC14/8CruL/KqnW/9ns8f/8/v//4OjX/z+GDf85kAD/PIwD/z2JAv8+hQD/PoEA/9C7pv/97uv////+/9Xw+v+w3ej/ls/e/+rz9///////+/z6/22mSf8qjQH/OJMA/zuQAP85iwL/PIgA/zyFAP+OSSL/nV44/7J+Vv/AkG7/7trP//7//f/9//7/6/Lr/2uoRv8tjQH/PJYA/zuTAP87kwD/PY8A/z2KA |
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
(define-minor-mode infer-indentation-mode | |
"infer-indentation" | |
"" | |
:keymap nil | |
;; store the original settings so we can switch back | |
(when (not (boundp 'infer-indentation-original-style)) | |
(set (make-local-variable 'infer-indentation-original-style) indent-tabs-mode)) | |
(when (not (boundp 'infer-indentation-original-width)) | |
(set (make-local-variable 'infer-indentation-original-width) tab-width)) |
NewerOlder