Skip to content

Instantly share code, notes, and snippets.

@dcunited001
dcunited001 / private.xml
Created December 2, 2012 12:20
KeyRemap4MacBook Eject Key private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Custom Eject</name>
<!-- Install NoEjectDelay for KeyRemap4MacBook -->
<!-- add to private.xml in KeyRemap4MacBook -->
<item>
<name>Eject to F19</name>
@dcunited001
dcunited001 / private.xml
Created December 2, 2012 12:40
KeyRemap4MacBook Virtual Hyper Key private.xml
<?xml version="1.0"?>
<root>
<item>
<name>PC Application Key as Virtual Hyper Key</name>
<!-- configure PCKeyboardHack to map Escape to PC Application Key (KeyCode 110) -->
<!-- add to private.xml in KeyRemap4MacBook -->
<item>
<name>Remap F19 to Hyper</name>
@dcunited001
dcunited001 / .Xmodmap
Created December 2, 2012 12:48
Configure Hyper Key in Linux with Xmodmap
! This sets Caps to Escape
! Then sets Escape to Hyper
! save this file to: /etc/X11/xinit/Xmodmaprc
! then call in: /etc/X11/xinit/xinitrc
! with: xmodmap /etc/X11/xinit/Xmodmaprc
! ASUS UL50V
clear Lock
@dcunited001
dcunited001 / new_finder_window.applescript
Created December 2, 2012 13:13
Automator Service to Open New Finder Window
-- create new service in automator
-- set input to "no input" instead of "text"
-- add new task: run applescript
on run {input, parameters}
tell application "Finder"
activate
set new_window to make new Finder window
end tell
end run
@dcunited001
dcunited001 / private.xml
Created December 2, 2012 13:49
KeyRemap4MacBook New Virtual Modifier Key - private.xml
<!-- just testing here, don't ask -->
<?xml version="1.0"?>
<root>
<item>
<name>Simultaneous Shift+Up as New Virtual Modifier Key</name>
<!-- configure KeyRemap4MacBook to map a simultaneous Shift+Up to PC Application Key -->
<!-- add this to private.xml in KeyRemap4MacBook -->
@dcunited001
dcunited001 / keyremap.applescript
Created December 6, 2012 19:53
Applescript to Reload KeyRemap4MacBook Private.xml
on run {input, parameters}
--version >= 7.99.5
--use "launch application" step instead
--tell application "KeyRemap4MacBook" to activate
tell application "System Events"
--version >= 7.99.5
tell application process "KeyRemap4MacBook"
@dcunited001
dcunited001 / addressable_templates.rb
Created February 14, 2013 16:27
An example of using the Addressable URI Templates. Couldn't find any other detailed gists. Most of these examples are just lifted from the Addressable specs.
# Addressable::Template#match
# Addressable::Template#variables
# {$1} where $1=reqvarname
# {$1=$2} where $1=varname & $2=defvalue
# {-list|$1|$2,$3} where $1=delim & $2=varname
# {-join|$1|$2=$3,$4=$5} where $1=delim & $2=varname & $3=value, etc
# {-prefix}
# {-suffix}
#===============================
# Search Google
#===============================
# using perl for brevity, for pure bash function:
# http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script
uriescape() { echo $_ | perl -MURI::Escape -lne 'print uri_escape($_)'; }
# site-wide codewall search via google
ggljoin() { echo "$*" | sed s/\ /+/g }
Yo Dawg!
http://bit.ly/11Peo1D
@dcunited001
dcunited001 / Gemfile
Last active December 14, 2015 17:28
Zeus Rails Config: - zeus json - custom plan - minitest helper - Guardfile - Gemfile `bundle install` `guard start` # https://github.com/dcunited001/guard-titan to setup: - need to write some test commands - and save them to the ".t/" folder - `echo 'zeus test test/models/*_test.rb' > .t/mo` - `touch .t/all` with this guard-titan config: - touch…
source :rubygems
# these really need to be saved in your default gemset
group :development, :test do
gem "zeus", "~> 0.13.2"
gem "guard-titan", "~> 0.0.1", github: "dcunited001/guard-titan"
end