Skip to content

Instantly share code, notes, and snippets.

@justinhj
justinhj / gist:eb2d354d06631076566f
Created May 12, 2014 02:01
Sending a notification from emacs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Terminal notifier
;; requires 'sudo gem install terminal-notifier'
;; stolen from erc-notifier
(defvar terminal-notifier-command (executable-find "terminal-notifier") "The path to terminal-notifier.")
; (terminal-notifier-notify "Emacs notification" "Something amusing happened")
(defun terminal-notifier-notify (title message)
anonymous
anonymous / emacs.memory.leak.aka.distnoted.patch.diff
Created January 22, 2014 03:45
This is a patch (with commentary) that fixes a memory leak in 24.3 for OSX Mavericks (10.9) users who experience excessive resource consumption by distnoted.
From 8ab91751069e391a95151c6716a546b1732ade92 Mon Sep 17 00:00:00 2001
From: JP <twitter:canoeberry>
Date: Sun, 19 Jan 2014 11:58:54 +0000
Subject: [PATCH] partial memleak fix
This patch was created by JP (twitter: @canoeberry) based on a memleak fix by Dirk (emacs committer) below:
https://github.com/mirrors/emacs/commit/57ae6509a3b6a274f89b9caea0284c6156470625
This memory leak is fixed in the trunk as of now and will be in the next official release: 24.4.
@ngs
ngs / shell.sh
Created August 28, 2013 19:43
Solution of LeapMotion Python SDK Error: Fatal Python error: PyThreadState_Get: no current thread
install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.7/Python /opt/boxen/homebrew/Cellar/python/2.7.3-boxen2/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib /Users/ngs/Documents/LeapDeveloperKit/LeapSDK/lib/LeapPython.so
@railwaycat
railwaycat / Emacs_starter.pl
Last active March 12, 2023 01:26
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@railwaycat
railwaycat / mac-switch-meta.el
Created August 28, 2012 13:43
meta key switch
;; Keybonds
(global-set-key [(hyper a)] 'mark-whole-buffer)
(global-set-key [(hyper v)] 'yank)
(global-set-key [(hyper c)] 'kill-ring-save)
(global-set-key [(hyper s)] 'save-buffer)
(global-set-key [(hyper l)] 'goto-line)
(global-set-key [(hyper w)]
(lambda () (interactive) (delete-window)))
(global-set-key [(hyper z)] 'undo)
@ladyada
ladyada / adafruitlightpaint4pi.py
Created August 10, 2012 00:26
Adafruit Light Painting with Pi
#!/usr/bin/python
# Light painting / POV demo for Raspberry Pi using
# Adafruit Digital Addressable RGB LED flex strip.
# ----> http://adafruit.com/products/306
import RPi.GPIO as GPIO, Image, time
# Configurable values
filename = "hello.png"
@ayman
ayman / TrackRegexRetweeter.py
Created March 8, 2010 23:40
This is a simple Twitter bot which listens to a track stream for a comma delimited list of terms/tags (PRIMARY_TRACK_LIST). From this stream, it will retweet any tweet that matches the secondary regex (SECONDARY_REGEX_FILTER).
#!/usr/bin/env python
# This is a simple Twitter bot which listens to a track stream for a comma delimited
# list of terms/tags (PRIMARY_TRACK_LIST). From this stream, it will retweet any
# tweet that matches the secondary regex (SECONDARY_REGEX_FILTER).
#
# This example is a #Haiti & #Chile Twitter stream listener for TweakTheTweet syntax.
#
# Requires Python 2.6
# Requires Tweepy http://github.com/joshthecoder/tweepy
#
/***************************************************************************
* Copyright (C) 2009 by Paul Lutus, Ian Clarke *
* lutusp@arachnoid.com, ian.clarke@gmail.com *
* *
* This program 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 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *