Skip to content

Instantly share code, notes, and snippets.

@ericbmerritt
ericbmerritt / Makefile
Last active August 11, 2023 09:35
Universal drop in Makefile for Erlang projects that use rebar
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
anonymous
anonymous / gist:5055224
Created February 28, 2013 08:36
mu4e setup
(setq mu4e-mu-binary "/usr/local/bin/mu"
mu4e-sent-folder "/[Gmail].Sent Mail"
mu4e-drafts-folder "/[Gmail].Drafts"
mu4e-trash-folder "/[Gmail].Trash"
mu4e-refile-folder "/Archives"
mu4e-use-fancy-chars nil)
(setq user-mail-address "foo"
user-full-name "bar"
mail-user-agent 'message-user-agent
@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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 29, 2024 08:12
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@JakubOboza
JakubOboza / gist:2250602
Created March 30, 2012 10:18
erlang json resource for webmachine
%% @author Bryan Fink
%% @doc formjson_resource takes x-www-form-urlencoded data and
%% re-encodes it as JSON. The data is expected as query
%% parameters for a GET, and request body for a POST.
%%
%% ```
%% In: one=two&me=pope
%% Out: {"one":"two","me":"pope"}
%% '''
-module(formjson_resource).
@Overbryd
Overbryd / nginx.conf
Created March 27, 2012 22:22
Nginx configuration for a CouchDB reverse proxy, also very useful for hosting CouchApps
worker_processes 4;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
@cemerick
cemerick / gist:1485920
Created December 16, 2011 12:46
Working on a CouchDB type for Clojure
;; Clutch provides a pretty comprehensive API, but I'm frustated that 95% of database
;; interactions require using something other than the typical Clojure vocabulary of
;; assoc/conj/dissoc/get/seq/reduce/etc, even though those semantics are entirely appropriate
;; (modulo the whole stateful database thing).
;;
;; This is (the start of) an attempt to create a type to provide most of the
;; functionality of Clutch with a more pleasant, concise API (it uses the Clutch API
;; under the covers, and rare operations would generally remain accessible only
;; at that lower level).
;;
@dbalatero
dbalatero / failover.rb
Created October 26, 2011 07:17
Provides basic failover for Resque -> MySQL
module Resque
# Provides a Failover to MySQL.
module Failover
def self.extended(base)
base.class_eval do
class << self
alias_method_chain :enqueue, :active_record_failover
alias_method_chain :enqueue_at, :active_record_failover
end
end
# in /usr/share/xsessions
[Desktop Entry]
Name=Xmonad GNOME
Comment=Tiling window manager
TryExec=/usr/bin/gnome-session
Exec=gnome-session --session=xmonad
Type=XSession
@utaal
utaal / Makefile
Created September 5, 2011 16:42
webserver using libuv
webserver: webserver.c libuv/uv.a http-parser/http_parser.o
gcc -I libuv/include \
-lrt -lm -lpthread -o \
webserver webserver.c \
libuv/uv.a http-parser/http_parser.o
libuv/uv.a:
$(MAKE) -C libuv
http-parser/http_parser.o: