Skip to content

Instantly share code, notes, and snippets.

@wernerandrew
wernerandrew / emacsclient.sh
Created December 12, 2018 22:34
emacs client alias
function emacs_running {
ps ax | grep -v grep | grep 'Emacs\.app' >/dev/null 2>&1
}
# use a different emacs
function my_emacsclient {
if ! emacs_running; then
echo "Waiting for Emacs server..."
osascript -e 'tell application "Emacs" to activate'
IDX=0
@wernerandrew
wernerandrew / keybase.md
Created July 29, 2017 14:02
Keybase, baby

Keybase proof

I hereby claim:

  • I am wernerandrew on github.
  • I am wernerandrew (https://keybase.io/wernerandrew) on keybase.
  • I have a public key ASCK3t0d1aiEYUzBAwMBaUxzWdK6pQ4mQwfgcY7dwIwMTQo

To claim this, I am signing this object:

@wernerandrew
wernerandrew / auto-git-link.el
Last active August 29, 2015 14:22
Helper to automatically create a github link for the current buffer
Open PowerShell or cmd.exe
C:\ ... > cd C:\Program Files (x86)\Datadog\Datadog Agent\files
C:\ ... > ./shell.exe
Datadog Agent v4.1.0 - Python Shell
>>> import wmi; w = wmi.WMI()
>>> disk = w.Win32_PerfFormattedData_PerfDisk_LogicalDisk()
>>> print [{'Name': d.Name, 'WriteBytes': d.DiskWriteBytesPerSec, 'Writes': d.DiskWritesPerSec, 'Queue': d.CurrentDiskQueueLength} for d in disk]