Skip to content

Instantly share code, notes, and snippets.

View marcwebbie's full-sized avatar

Marcwebbie marcwebbie

View GitHub Profile
@cribeiro
cribeiro / emacs-first-notes.md
Last active November 12, 2016 23:09
Emacs Survival Guide

Emacs Survival Guide

Notation

C for Control key (also labeled as CTL or CTRL on keyboards)

M for Meta key (also labeled as EDIT, ALT or COMMAND on keyboards)

if your keyboard doesn't have this key, just press and release ESC for the same purpose.

C- means hold the Control key while typing the key chr.

@TauPan
TauPan / elpy-test-pdb-config.el
Last active December 11, 2017 06:27
Emacs configuration snippet for testing python with elpy, nosetests and django-nose with pdb in a gud-buffer
(use-package elpy
:config
(progn (elpy-enable)
(defun elpy-nose-test-spec (module test)
(cond (test
(format "%s:%s" module test))
(module module)
(t "")))
(defun elpy-test-nose-pdb-runner (top file module test)
"Test the project using the nose test runner with the --pdb arg.
@dreadatour
dreadatour / gist:7475747
Created November 14, 2013 22:51
Remove default Sublime Text 3 snippets
# Sublime Text 3 languages list:
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/
# Remove all default Sublime Text 3 snippets for Python language
export ST3_LANG="Python"
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done
unset ST3_LANG
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...