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:
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 |
I hereby claim:
To claim this, I am signing this object:
;; Creates a github link to the code at point (or in the region) and copies into the kill ring | |
;; Preface with C-u in order to actually visit the link in the browser | |
;; Only works with github for now, and probably only on OSX for the opening. | |
;; Also won't work right on unpushed changes, obvs. | |
(defun aw/get-github-link () | |
(interactive) | |
;; a slightly more readable string helper | |
(defun strip-regexp-multi (regexp-list str) | |
(if regexp-list |
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] |