Skip to content

Instantly share code, notes, and snippets.

View cmsj's full-sized avatar
🏠
Working from home

Chris Jones cmsj

🏠
Working from home
View GitHub Profile
@cmsj
cmsj / -
Created July 5, 2014 00:39
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()
@cmsj
cmsj / -
Created October 17, 2014 18:51
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>
@cmsj
cmsj / -
Created October 22, 2014 19:51
--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"
@cmsj
cmsj / -
Created October 22, 2014 23:19
/*
* 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,
### 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:
@cmsj
cmsj / -
Created January 4, 2015 19:52
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:)
@cmsj
cmsj / -
Created January 4, 2015 20:08
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:)
@cmsj
cmsj / -
Created January 9, 2015 22:42
<?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,
@cmsj
cmsj / -
Created January 14, 2015 21:33
diff --git a/extensions/keycodes/internal.m b/extensions/keycodes/internal.m
index 8a1731e..dcdf405 100644
--- a/extensions/keycodes/internal.m
+++ b/extensions/keycodes/internal.m
@@ -24,7 +24,7 @@ int keycodes_cachemap(lua_State* L) {
kVK_ANSI_4, kVK_ANSI_5, kVK_ANSI_6, kVK_ANSI_7, kVK_ANSI_8, kVK_ANSI_9,
kVK_ANSI_Grave, kVK_ANSI_Equal, kVK_ANSI_Minus, kVK_ANSI_RightBracket,
kVK_ANSI_LeftBracket, kVK_ANSI_Quote, kVK_ANSI_Semicolon, kVK_ANSI_Backslash,
- kVK_ANSI_Comma, kVK_ANSI_Slash, kVK_ANSI_Period,
+ kVK_ANSI_Comma, kVK_ANSI_Slash, kVK_ANSI_Period, kVK_ISO_Section,
@cmsj
cmsj / -
Created February 11, 2015 11:25
" Be iMproved
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
" Bundles
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'