Skip to content

Instantly share code, notes, and snippets.

View legumbre's full-sized avatar

Leonardo Etcheverry legumbre

  • GlamST / Ulta
  • Montevideo, Uruguay
View GitHub Profile
@legumbre
legumbre / verify.sh
Created November 6, 2011 03:28
GPG verify signature (firefox)
# verifying firefox signature on live distro
user@debian:~/Downloads$ gpg --verify firefox-7.0.1.tar.bz2.asc firefox-7.0.1.tar.bz2
gpg: Signature made Fri 30 Sep 2011 06:39:02 PM UTC using DSA key ID C52175E2
gpg: Can't check signature: public key not found
user@debian:~/Downloads$ gpg --search-keys C52175E2
gpg: searching for "C52175E2" from hkp server keys.gnupg.net
(1) Mozilla Software Releases <[email protected]>
1024 bit DSA key 1EBCAB3A, created: 2011-07-22
gist.el test test test
"description": [
foo,
bar,
baz,
ban ]
"description": [
foo2,
bar2,
baz2,
(query-replace-regexp "\"description\": \\[
.*
.*
.*
.*\\]" "REPLACED!" nil (if (and transient-mark-mode mark-active) (region-beginning)) (if (and transient-mark-mode mark-active) (region-end))) ;; C-x C-e here
"description": [
foo,
bar,
baz,
;; defadvice sample for dropdive
(defadvice ask-user-about-supersession-threat (around ask-user-supersession-with-diff activate)
"Diff the buffer with the backing (modified) file"
(diff-buffer-with-file)
ad-do-it)
# show git branch in prompt
# got it from https://gist.github.com/790086
parse_git_branch() {
ref=$(git symbolic-ref -q HEAD 2> /dev/null) || return
printf "${1:-(%s)}" "${ref#refs/heads/}"
}
parse_svn_revision() {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
(defun rrnic-diff (cmd1 cmd2)
(interactive
(list
(read-shell-command "Shell command (1): " nil nil)
(read-shell-command "Shell command (2): " nil nil)))
(let ((b1 (get-buffer-create "*1*")) (b2 (get-buffer-create "*2*")))
(shell-command cmd1 b1)
(shell-command cmd2 b2)
(ediff-buffers b1 b2)))
(defun rrnic-diff (cmd1 cmd2)
(interactive
(list
(read-shell-command "Shell command (1): " nil nil)
(read-shell-command "Shell command (2): " nil nil)))
(let ((b1 (get-buffer-create "*1*")) (b2 (get-buffer-create "*2*")))
(shell-command cmd1 b1)
(shell-command cmd2 b2)
(ediff-buffers b1 b2)))
(defun erc-highlight-nicknames ()
"Searches for nicknames and highlights them. Uses the first
twelve digits of the MD5 message digest of the nickname as
color (#rrrrggggbbbb)."
(with-syntax-table erc-button-syntax-table
(let (bounds word color new-nick-face)
(goto-char (point-min))
(while (re-search-forward "\\w+" nil t)
(setq bounds (bounds-of-thing-at-point 'word))
(setq word (buffer-substring-no-properties
@legumbre
legumbre / gist:1847750
Created February 16, 2012 20:51
conkeror in_module mechanism removal
commit 37da0aed0b33973893ac909fc707d84ce7c3f170
Author: John Foerch <[email protected]>
Date: Sun Jan 29 21:27:19 2012 -0500
remove in_module mechanism
The procedure in_module was a central concept to the "new module system"
of 2010-03-19 that was to have made modules possible within the framework
of Conkeror's 'load' and 'require' mechanism. However, there was a fatal
flaw in the design, and it really doesn't work after all. The flaw was