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 / .emacs-local.el
Created April 19, 2009 09:03
.emacs-local.el
;; -*- mode: emacs-lisp; auto-compile-lisp: nil; -*-
;;;;;;;;;;;;;;;;;;;;;;;;
;; Name/Email settings
;;
(setq user-full-name "Firstname Lastname")
(setq user-mail-address "me@example.com")
(setq message-alternative-emails (rx "other.me@example.com"))
(setq home-directory (getenv "HOME"))
@sigma
sigma / .gnus-local.el
Created April 19, 2009 09:11
.gnus-local.el
;;; Use smtp server for mail sending
(setq send-mail-function 'smtpmail-send-it) ; if you use `mail'
(setq message-send-mail-function 'message-smtpmail-send-it) ; if you use message/Gnus
(require 'smtpmail)
;; (setq smtpmail-default-smtp-server "smtp.vmware.com"
;; smtpmail-smtp-server "smtp.vmware.com"
;; smtpmail-smtp-service 25
;; smtpmail-local-domain "vmware.com")
@sigma
sigma / .xmodmap
Created August 20, 2009 12:07
.xmodmap
keycode 0x12 = 9 bracketleft
keycode 0x13 = 0 bracketright
keycode 0x22 = parenleft braceleft
keycode 0x23 = parenright braceright
remove Lock = Caps_Lock
remove Control = Control_L
remove Control = Control_R
remove Mod2 = Num_Lock
@sigma
sigma / ipy_user_conf.py
Created August 30, 2009 17:47
ipy_user_conf.py
""" User configuration file for IPython """
# Most of your config files and extensions will probably start with this import
import IPython.ipapi
ip = IPython.ipapi.get()
import ipy_defaults
import os
@sigma
sigma / ssl_tee.sh
Created November 2, 2009 13:57
#published ssl_tee.sh
#!/bin/bash
# this allows to dump clear-text form of the exchanges between SSL client and SSL server
# client-side verification has to be disabled of course
# anyway, useful for debugging
# to run this you'll need
# - a unix system
# - socat
# - ncat (part of nmap 5.0 suite)
@sigma
sigma / nfs_force_umount
Created November 9, 2009 14:06
force umount NFS
ifconfig eth0:fakenfs <dead nfs server> netmask 255.255.255.255
umount -f /nfs/...
ifconfig eth0:fakenfs down
@sigma
sigma / etags-kill.el
Created November 30, 2009 16:20
etags-kill.el
;;; etags-kill.el --- kill useless buffers when browsing tags
;; Copyright (C) 2009 Free Software Foundation, Inc.
;; Author: Yann Hodique <yhodique@vmware.com>
;; 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)
@sigma
sigma / shovestore.py
Created December 16, 2009 16:57
recursive python shove
from shove import Shove
class ShoveStore(Shove):
""" usage: Shove('shove://(shove://(sqlite://data.db file://data_files) memory://)',
'simple://', shove_params={'shove_params': {}})
"""
def __init__(self, engine, **kw):
url = engine.partition('://')[2][1:-1]
@sigma
sigma / _workon
Created March 19, 2010 21:46
workon completion
#compdef workon
_workon_envs () {
local expl devs
envs=( $(workon) )
_wanted envs expl 'available envs' \
compadd "$@" - "${(@)envs%%:*}"
}
@sigma
sigma / gist:342053
Created March 24, 2010 07:08
projects hashing
for proj in ~/Projects/*/*(/); do
hash -d ${proj##*/}=${proj}
done