Skip to content

Instantly share code, notes, and snippets.

@jgrodziski
jgrodziski / private.xml
Created November 22, 2013 12:13
This is my modified private.xml for keyremap4macbook and a US mac keyboard
<?xml version="1.0"?>
<root>
<appdef>
<appname>ITERM</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<!--
KeyRemap4MacBook defines a list of apps to ignore when using any of the
"Emacs Mode" key mappings. That list includes "TERMINAL" (as well as other
@jgrodziski
jgrodziski / zipper-core.clj
Created November 21, 2013 20:56
The source code of the Clojure User Group Paris talk about zipper data structure (nov 2013). Enjoy ! Slides are here : https://speakerdeck.com/jgrodziski/clojure-zipper
(ns zipper.core
(require [clojure.zip :as z]))
(def my-tree ["0" ["1A" "1B" "1C"
["2A" "2B" "2C"
["3A" "3B" "3C"]]
["2D" "2E" "2F"
["3D" "3E"]]
"1D" "1E" "1F"]])
# -----------------------------------------------------------------------------
# FILE: jerem.zsh-theme
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Jérémie Grodziski (www.grodziski.com)
# VERSION: 0.1
# SCREENSHOT: http://www.grodziski.com/images/jerem.zsh-theme.png
# -----------------------------------------------------------------------------
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
(defun nrepl-send-to-repl ()
"Send the appropriate forms to the repl to be evaluated."
(interactive)
(save-excursion
(cond
;; Region selected - evaluate region
((not (equal mark-active nil))
(copy-region-as-kill (mark) (point)))
;; At/before sexp - evaluate next sexp
((or (looking-at "\s(")
@jgrodziski
jgrodziski / private.xml
Last active December 15, 2015 08:09
This is my modified private.xml that remap the 'shift' key to left and right paren respectively. Then 'cmd+shift' to [, 'alt-shift' to { (same for the right side). Very useful for all non-US keyboardist like me (french layout! definitely not one for hacker)
<?xml version="1.0"?>
<root>
<item>
<name>Use the correct shift keys.</name>
<identifier>private.correct_shift_keys</identifier>
<autogen>--KeyToKey-- KeyCode::Q, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
<autogen>--KeyToKey-- KeyCode::W, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
<autogen>--KeyToKey-- KeyCode::E, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
<autogen>--KeyToKey-- KeyCode::R, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>