Skip to content

Instantly share code, notes, and snippets.

View sigma's full-sized avatar
🏠
Working from Home

Yann Hodique sigma

🏠
Working from Home
View GitHub Profile
@sigma
sigma / package-install.el
Created February 22, 2012 10:42
marmalade package-install
;;; package-install.el --- auto-installer for package.el
;; Copyright (C) 2007, 2008 Tom Tromey <[email protected]>
;; Copyright (C) 2007, 2012 Yann Hodique <[email protected]>
;; This file is not (yet) part of GNU Emacs.
;; However, it is distributed under the same license.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@sigma
sigma / scratch.el
Created February 22, 2012 11:02
package install for emacs23
(let ((buffer (url-retrieve-synchronously
"https://gist.github.com/sigma/1884092/raw/9014a209f2fc5c8d31762d13ec495d9e92a412de/package-install.el")))
(save-excursion
(set-buffer buffer)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(let ((user-init-file (expand-file-name "~/.emacs")))
(eval-region (point) (point-max)))
(kill-buffer (current-buffer))))
@sigma
sigma / pcsc_md.h
Created April 3, 2012 14:08
pcsc_md.h (emacs bug)
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
@sigma
sigma / tee_exec.sh
Created April 8, 2012 19:27
tee_exec.sh
#!/bin/zsh
tempdir=$(mktemp -d) || exit
in_pipe="$tempdir/in_pipe"
out_pipe="$tempdir/out_pipe"
pipe="$1"
shift
function cleanUp() {
rm -rf -- "$tempdir"
@sigma
sigma / *scratch*.el
Created April 8, 2012 19:55
#emacs remove top-level #gnus topic
(defadvice gnus-topic-insert-topic-line
(around gnus-hide-top-topic (name visiblep shownp level entries &optional unread) act)
(unless (string= name "Gnus")
(let ((level (1- level)))
ad-do-it)))
@sigma
sigma / _gnus.el
Created April 9, 2012 18:30
#emacs #gnus rename "noname" #gpg signature to "signature.asc"
(defadvice mml2015-sign (after mml2015-sign-rename (cont) act)
(save-excursion
(search-backward "Content-Type: application/pgp-signature")
(goto-char (point-at-eol))
(insert "; name=\"signature.asc\"")))
@sigma
sigma / pr.md
Created November 1, 2012 09:52 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@sigma
sigma / dflet.el
Last active June 3, 2017 15:03
#emacs dynamic flet
;;; dflet.el --- dynamically-scoped flet
;; Copyright (C) 2012 Yann Hodique
;; Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
;; Author: Yann Hodique <[email protected]>
;; Keywords: lisp
;; Version: 0.1
;; This file is free software; you can redistribute it and/or modify
@sigma
sigma / setup.py
Created February 26, 2013 11:19
template for tox-based testing for emacs
from distutils.core import setup
setup(name="magit",
version='0',
)
@sigma
sigma / epack.el
Created March 3, 2013 15:38
attempt at introducing cl-like namespaces for emacs
;;; epack.el --- cl-like packages for emacs
;; Copyright (C) 2013 Yann Hodique
;; Author: Yann Hodique <[email protected]>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)