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
$ history | awk {'print $2, $3, $4'} | sort | uniq -c | sort -k1 -rn | head -n 30 | |
610 git status | |
568 git commit -m | |
491 git add . | |
252 git push origin | |
176 bundle | |
138 rails s | |
128 ls | |
120 git commit --amend | |
114 git reset --hard |
(defun source (filename) | |
"Update environment variables from a shell source file." | |
(interactive "fSource file: ") | |
(message "Sourcing environment from `%s'..." filename) | |
(with-temp-buffer | |
(shell-command (format "diff -u <(true; export) <(source %s; export)" filename) '(4)) | |
(let ((envvar-re "declare -x \\([^=]+\\)=\\(.*\\)$")) |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
// active pane | |
.pane { | |
.gutter, | |
ul.tab-bar { | |
opacity: 0.4; | |
} | |
} | |
.pane.active { | |
.gutter { | |
opacity: 1; |
#! /usr/bin/python | |
import sys | |
import ldap | |
from ldap.controls import SimplePagedResultsControl | |
from distutils.version import LooseVersion | |
# Check if we're using the Python "ldap" 2.4 or greater API | |
LDAP24API = LooseVersion(ldap.__version__) >= LooseVersion('2.4') |
-------------------------------------------------------------------------------- | |
-- Unsupported Spaces extension. Uses private APIs but works okay. | |
-- (http://github.com/asmagill/hammerspoon_asm.undocumented) | |
spaces = require("hs._asm.undocumented.spaces") | |
-- Get output of a bash command | |
function os.capture(cmd) | |
local f = assert(io.popen(cmd, 'r')) | |
local s = assert(f:read('*a')) | |
f:close() |
#!python3 | |
import imaplib | |
import os | |
import asyncio | |
loop = asyncio.get_event_loop() | |
conf = [x.strip().split() for x in open('mbsyncrc')] |
curl
to get the JSON response for the latest releasegrep
to find the line containing file URLcut
and tr
to extract the URLwget
to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }