This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-gud-toggle-breakpoint () | |
"Enable/disable breakpoint at the current line of source buffer." | |
(interactive) | |
(save-excursion | |
(beginning-of-line) | |
(let* ((bol (point)) | |
(ovl (overlay-get (car (overlays-in bol bol)) 'before-string)) | |
(bptno (get-text-property 0 'gdb-bptno ovl)) | |
(bpten (get-text-property 0 'gdb-enabled ovl))) | |
(if bpten (gud-basic-call (format "-break-disable %s" bptno)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar love2d-program "~/dev/love.app/Contents/MacOS/love") | |
(defun love2d-launch-current () | |
(interactive) | |
(let ((app-root (locate-dominating-file (buffer-file-name) "main.lua"))) | |
(if app-root | |
(shell-command (format "%s %s &" love2d-program app-root)) | |
(error "main.lua not found")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prototype = require 'prototype' | |
person = prototype { default = prototype.assignment_copy, use_prototype_delegation = true } | |
person.__tostring = function (s) return "My name is " .. s.name end | |
cacho = person:clone() | |
cacho.name = "Cacho" | |
print(cacho) | |
pocha = person:clone() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list | |
'compilation-error-regexp-alist-alist | |
'(mvn-error-windows "\\[ERROR\\][[:blank:]]+\\(.*\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" (lambda () (replace-regexp-in-string "\\\\" "/" (match-string 1))) 2 3 1 1 (0 compilation-error-face))) | |
(add-to-list 'compilation-error-regexp-alist 'mvn-error-windows) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 1. use a keyboard macro or regexp to turn your lines into: | |
0@ 58' 40.575" | |
0@ 30' 20.0" | |
2@ 58' 40.575" | |
;; 2. with region including all the previous lines, use calc-grab to grab all those values into calc: | |
M-x calc-grab-region or C-x * g | |
;; 3. Your calc buffer will look like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
obj_name="$1" | |
shift | |
git log "$@" --pretty=format:'%T %h %s' \ | |
| while read tree commit subject ; do | |
if git ls-tree -r $tree | grep -q "$obj_name" ; then | |
echo $commit "$subject" | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice magit-pull (around magit-pull-verbose compile activate) | |
"Force magit to use -v for git pull" | |
(let ((magit-custom-options (cons "-v" magit-custom-options))) | |
ad-do-it)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afconvert -f WAVE -d LEI16@44100 map_loop.m4a -o map_loop.wav |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; magit verbose logging hack | |
(defadvice magit-cmd-output (around magit-log-git-output activate) | |
(let ((output-string ad-do-it)) | |
(with-current-buffer (get-buffer-create "*magit-debug-output*") | |
(insert output-string)) | |
output-string)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; erc-highlight-nicknames.el --- Highlights nicknames | |
;; Copyright (C) 2007 André Riemann | |
;; Copyright (C) 2008 Andy Stewart | |
;; Author: André Riemann <[email protected]> | |
;; Maintainer: André Riemann <[email protected]> | |
;; Created: 2007-09-25 | |
;; Keywords: comm, faces |