Secret Ham

With a little side of applesauce...

Friday, June 27, 2014

EMACS - .emacs config notes when installing Magit through ELPA

Don't forget to load git-rebase-mode and git-commit-mode, in addition to magit.

Here's a quick example config for your .emacs:
(add-to-list 'load-path "~/.emacs.d/elpa/git-rebase-mode-20140605.520/")
(add-to-list 'load-path "~/.emacs.d/elpa/git-commit-mode-20140605.520/")
(add-to-list 'load-path "~/.emacs.d/elpa/magit-20140623.1208/")
(require 'magit)

Tuesday, October 1, 2013

Click doesn't give element focus in Chrome?

Click doesn't give element focus in #chrome? Seems to be this issue: https://bugs.webkit.org/show_bug.cgi?id=22261 . Here is a fix:
// fix webkit bug #22261, which doesn't give   
// radio buttons focus when clicked with mouse
$('input').click(function() {
   $(this).focus();
});

Thursday, August 15, 2013

Gmail: How to revert to old Gmail mailbox

If you find the tabbed Gmail interface cumbersome, you can revert to the old-school no-tab interface by clicking on:

  Settings -> Configure inbox

And, unchecking all of the boxes, except for Primary.

Monday, May 20, 2013

dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid

I just upgraded to Mountain Lion on Friday, and have been plagued by this error:
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
The best fix that I have seen is:
sudo () { ( unset LD_LIBRARY_PATH DYLD_LIBRARY_PATH; exec command sudo $* ) }
Short and elegant. Stolen from here.

Monday, January 28, 2013

EMACS 24 and Windows 7 - current-kill: Symbol's function definition is void: x-cut-buffer-or-selection-value

If you are getting the following error when setting up EMACS 24 on Windows 7:

current-kill: Symbol's function definition is void: x-cut-buffer-or-selection-value

Open your .emacs and change:
'x-cut-buffer-or-selection-value)

to:
(setq interprogram-paste-function 'x-selection-value)

I found the answer in this posting:
http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg00638.html

Wednesday, January 2, 2013

jwerty keymapping

Just placing these here, as it is easier for me to access than the github source... I needed arrow keys, and if you look in the following code, you see a long text version for these, (ie. arrow-left, arrow-right).
  // Generate key mappings for common keys that are not printable.
    var _keys = {
        
        // MOD aka toggleable keys
        mods: {
            // Shift key, ⇧
            '⇧': 16, shift: 16,
            // CTRL key, on Mac: ⌃
            '⌃': 17, ctrl: 17,
            // ALT key, on Mac: ⌥ (Alt)
            '⌥': 18, alt: 18, option: 18,
            // META, on Mac: ⌘ (CMD), on Windows (Win), on Linux (Super)
            '⌘': 91, meta: 91, cmd: 91, 'super': 91, win: 91
        },
        
        // Normal keys
        keys: {
            // Backspace key, on Mac: ⌫ (Backspace)
            '⌫': 8, backspace: 8,
            // Tab Key, on Mac: ⇥ (Tab), on Windows ⇥⇥
            '⇥': 9, '⇆': 9, tab: 9,
            // Return key, ↩
            '↩': 13, 'return': 13, enter: 13, '⌅': 13,
            // Pause/Break key
            'pause': 19, 'pause-break': 19,
            // Caps Lock key, ⇪
            '⇪': 20, caps: 20, 'caps-lock': 20,
            // Escape key, on Mac: ⎋, on Windows: Esc
            '⎋': 27, escape: 27, esc: 27,
            // Space key
            space: 32,
            // Page-Up key, or pgup, on Mac: ↖
            '↖': 33, pgup: 33, 'page-up': 33,
            // Page-Down key, or pgdown, on Mac: ↘
            '↘': 34, pgdown: 34, 'page-down': 34,
            // END key, on Mac: ⇟
            '⇟': 35, end: 35,
            // HOME key, on Mac: ⇞
            '⇞': 36, home: 36,
            // Insert key, or ins
            ins: 45, insert: 45,
            // Delete key, on Mac: ⌫ (Delete)
            del: 46, 'delete': 46,
            
            // Left Arrow Key, or ←
            '←': 37, left: 37, 'arrow-left': 37,
            // Up Arrow Key, or ↑
            '↑': 38, up: 38, 'arrow-up': 38,
            // Right Arrow Key, or →
            '→': 39, right: 39, 'arrow-right': 39,
            // Up Arrow Key, or ↓
            '↓': 40, down: 40, 'arrow-down': 40,
            
            // odities, printing characters that come out wrong:
            // Num-Multiply, or *
            '*': 106, star: 106, asterisk: 106, multiply: 106,
            // Num-Plus or +
            '+': 107, 'plus': 107,
            // Num-Subtract, or -
            '-': 109, subtract: 109,
            // Semicolon
            ';': 186, semicolon:186,
            // = or equals
            '=': 187, 'equals': 187,
            // Comma, or ,
            ',': 188, comma: 188,
            //'-': 189, //???
            // Period, or ., or full-stop
            '.': 190, period: 190, 'full-stop': 190,
            // Slash, or /, or forward-slash
            '/': 191, slash: 191, 'forward-slash': 191,
            // Tick, or `, or back-quote 
            '`': 192, tick: 192, 'back-quote': 192,
            // Open bracket, or [
            '[': 219, 'open-bracket': 219,
            // Back slash, or \
            '\\': 220, 'back-slash': 220,
            // Close backet, or ]
            ']': 221, 'close-bracket': 221,
            // Apostraphe, or Quote, or '
            '\'': 222, quote: 222, apostraphe: 222
        }
        
    };