Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Chris Jones cmsj

🏠
Working from home
View GitHub Profile
@cmsj
cmsj / gist:4694242
Created Feb 1, 2013
My current lcd4linux configuration. For more details of some of the python stuff here, and some preview videos, see: http://www.tenshu.net/2013/01/funky-lcd4linux-python-module.html
View gist:4694242
# lcd4linux config
## Local config
Variables {
# This are useful substitutions for later
tick 500
tack 100
seconds 2000
net_if 'br0' # Set this to the network interface to monitor
View gist:5171312
" Make syntastic check when opening a file
:let g:syntastic_check_on_open=1
" Fancy syntastic error/warning symbols
let g:syntastic_error_symbol='✗'
let g:syntastic_warning_symbol='⚠'
" Limit syntastic location list window height
let g:syntastic_loc_list_height=4
View -
require "grid"
ext.grid.MARGINX = 0
ext.grid.MARGINY = 0
hydra.alert "Hail hydra!"
pathwatcher.new(os.getenv("HOME") .. "/.hydra/", hydra.reload):start()
autolaunch.set(true)
menu.show(function()
View -
diff --git a/Hammerspoon/Hammerspoon-Info.plist b/Hammerspoon/Hammerspoon-Info.plist
index 75c71a6..923c365 100644
--- a/Hammerspoon/Hammerspoon-Info.plist
+++ b/Hammerspoon/Hammerspoon-Info.plist
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>0.9.0</string>
+ <string>0.9.1</string>
View -
--require "pl.strict"
local window = require "hs.window"
local screen = require "hs.screen"
local hotkey = require "hs.hotkey"
local geometry = require "hs.geometry"
local fnutils = require "hs.fnutils"
local appfinder = require "hs.appfinder"
local caffeinate = require "hs.caffeinate"
local notify = require "hs.notify"
--local screenwatch = require "hs._asm.watcher.screen"
View -
/*
* Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
View gist:c29531a45f018ebc0eab
### Keybase proof
I hereby claim:
* I am cmsj on github.
* I am cmsj (https://keybase.io/cmsj) on keybase.
* I have a public key whose fingerprint is 6C99 9021 9B3A EC6D 4A28 7EE7 C574 7646 7313 2D75
To claim this, I am signing this object:
View -
diff --git a/Hammerspoon/MJConsoleWindowController.m b/Hammerspoon/MJConsoleWindowController.m
index ea234d0..c54561a 100644
--- a/Hammerspoon/MJConsoleWindowController.m
+++ b/Hammerspoon/MJConsoleWindowController.m
@@ -84,7 +84,10 @@ typedef NS_ENUM(NSUInteger, MJReplLineType) {
NSDictionary* attrs = @{NSFontAttributeName: [NSFont fontWithName:@"Menlo" size:12.0], NSForegroundColorAttributeName: color};
NSAttributedString* attrstr = [[NSAttributedString alloc] initWithString:str attributes:attrs];
- [[self.outputView textStorage] appendAttributedString:attrstr];
+ [[self.outputView textStorage] performSelectorOnMainThread:@selector(appendAttributedString:)
View -
diff --git a/Hammerspoon/MJConsoleWindowController.m b/Hammerspoon/MJConsoleWindowController.m
index ea234d0..985fb24 100644
--- a/Hammerspoon/MJConsoleWindowController.m
+++ b/Hammerspoon/MJConsoleWindowController.m
@@ -84,7 +84,9 @@ typedef NS_ENUM(NSUInteger, MJReplLineType) {
NSDictionary* attrs = @{NSFontAttributeName: [NSFont fontWithName:@"Menlo" size:12.0], NSForegroundColorAttributeName: color};
NSAttributedString* attrstr = [[NSAttributedString alloc] initWithString:str attributes:attrs];
- [[self.outputView textStorage] appendAttributedString:attrstr];
+ [[self.outputView textStorage] performSelectorOnMainThread:@selector(appendAttributedString:)
View -
<?xml version="1.0"?>
<root>
<item>
<name>Remap F19 to Hyper</name>
<appendix>OS X doesn't have a Hyper. This maps Right Control to Control + Shift + Option + Command.</appendix>
<identifier>cmsj.f19_to_hyper</identifier>
<autogen>
--KeyToKey--
KeyCode::F19,
You can’t perform that action at this time.