This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export DISPLAY=:0 | |
# Pause recording | |
xdotool mousemove --sync 311 56 | |
xdotool click 1 | |
sleep 2 | |
# Save recording |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# [sudo] gem install mechanize | |
# ruby tumblr-photo-ripper.rb | |
require 'rubygems' | |
require 'mechanize' | |
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com" | |
site = "doctorwho" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
{port_env, [{"win32", "CC", "gcc.exe"}, | |
{"win32", "LINKER", "ld.exe"}, | |
{"win32", "CFLAGS", "-O3 -march=native $ERL_CFLAGS"}, | |
{"win32", "DRV_CFLAGS", "-g -Wall $ERL_CFLAGS"}, | |
{"win32", "DRV_LDFLAGS", "-shared $ERL_LDFLAGS"}, | |
{"win32", "DRV_CC_TEMPLATE", "$CC -c $CFLAGS $DRV_CFLAGS $PORT_IN_FILES -o $PORT_OUT_FILE"}, | |
{"win32", "DRV_LINK_TEMPLATE", "$LINKER $PORT_IN_FILES $LDFLAGS $DRV_LDFLAGS -o $PORT_OUT_FILE"}, | |
{"win32", "ERL_LDFLAGS", " -L$ERL_EI_LIBDIR -lerl_interface -lei"} | |
]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq golden-ratio-inhibit-functions (lambda() (when (string-match "\*.*\*" (buffer-name)) t))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you get stuck on the BTX boot loader spinner after doing the first step in upgrading from 9.0 to 9.1 you can try reinstalling the bootsector from a 9.1 cd (I used mfsbsd live usb image), that fixed it for me. I'm using GPT and zfs root so I issued "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <disk>" for all disks in my raidz root pool. | |
Standard disclaimer applies: use at your own risk, I take no responsibility for anything you might break. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Populate epa-file-passphrase-alist | |
(load-file (concat (getenv "HOME") "/.secrets.el.gpg")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice newline-and-indent (after darrik-nai-curly-special activate) | |
"Do something special when RET between {}." | |
(when (eq (char-after) ?\}) | |
(let ((pos (point))) | |
(if (search-backward "{") | |
(progn | |
(goto-char pos) | |
(newline) | |
(indent-according-to-mode) | |
(previous-line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Tracker Software\PDFViewer\PageDisplay\Colors\Overrides\Custom] | |
"TextFill"=dword:00969483 | |
"LineArtFill"=dword:00423607 | |
"UseLineArt"=dword:00000001 | |
"UseText"=dword:00000001 | |
"LineArtStroke"=dword:00756e58 | |
"Background"=dword:00362b00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Extremely simple, just appends whatever you feed strftime to the end of the current line. | |
" If one was so inclined one could make it smarter like being able to insert at current cursor position and such. | |
function! DarrikInsertDate() | |
mz << EOF | |
(define (vim-strftime fmt) | |
(bytes->string/utf-8 (vim-eval (string-append "strftime('" fmt "')")))) | |
(define (vim-get-current-line-contents) | |
(bytes->string/utf-8 (vim-get-buff-line (car (vim-get-cursor))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Based on (org-revert-all-org-buffers) | |
(defun darrik/revert-all-buffers () | |
(interactive) | |
(unless (yes-or-no-p "Revert all buffers?") | |
(error "Abort")) | |
(save-excursion | |
(save-window-excursion | |
(mapc | |
(lambda (buffer) | |
(when (with-current-buffer buffer buffer-file-name) |