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
;; An Org-mode capture template for scheduling a phone call to a BBDB contact. | |
;; Shortcut key: c | |
;; Target location: Under headline "Incoming" in file "~/org/ToDo.org". | |
;; Default tags: @phone | |
;; The function `ph/capture-bbdb' (see below) handles BBDB contacts with either a name or only an organization. | |
;; | |
;; To use this capture template, first mark the whole of the specific phone number you | |
;; want within the contact record in the *BBDB* buffer, then hit C-c t c. | |
;; | |
;; Prompts for: |
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
#!/usr/bin/env bash | |
# Did caller pass in an epoch time to compare? | |
if [ $# = 1 ]; then | |
"${HOME}/bin/test-host-times-match" "$1" || echo 'WARNING: Time out of sync' 1>&2 | |
fi | |
# Primes the (possibly new) screen session with a (possibly new) remote DISPLAY | |
echo "${DISPLAY:-:10.0}" > "${HOME}/tmp/display" |
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/tcsh -f | |
# For use by a terminal emulator as its startup script. | |
# Sets `DISPLAY' to `localhost:0.0' and launches/re-attaches `screen'. | |
echo ":0.0" > "$HOME/tmp/display" | |
switch ( "$OSTYPE" ) | |
case "darwin": | |
set SCREEN='/opt/local/bin/screen' | |
breaksw | |
default: | |
set SCREEN='/usr/bin/screen' |
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
#!/usr/bin/env bash | |
# To be called by a GNU screen keybinding | |
screen_copybuffer_file="${HOME}/tmp/screen-copybuffer" | |
case "$OSTYPE" in | |
[Dd]arwin*) | |
pbcopy < "$screen_copybuffer_file" |
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
// Time-stamp: "2015-05-03 14:02:16 phil" | |
// Section 7x is for Conkeror internal tweaks (?) | |
dumpln("72theme"); | |
// Example: darken Astronomy Picture of the Day (APOD) | |
// register_user_stylesheet( | |
// make_css_data_uri(["body{background: black !important; color: grey !important;}", | |
// ":link, :link * {color: #4986dd !important;}", | |
// ":visited, :visited * {color: #d75047 !important;}"], | |
// $url_prefixes = "http://apod.nasa.gov/apod/")); |
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
(defun ph/yank-quote (&optional arg) | |
"Yank, passing optional prefix ARG to `yank', and quote." | |
(interactive "*P") | |
(yank arg) | |
(let | |
((end-marker (copy-marker (point-marker) t)) | |
(start-marker (copy-marker (mark)))) | |
(string-rectangle start-marker end-marker "> ") | |
(fill-region start-marker end-marker))) |
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
(defun ph/shell-escaper (matched-text) | |
"Return replacement text for MATCHED-TEXT when shell-escaping. | |
See `ph/shell-escape'." | |
(cond | |
;; Already escaped? | |
((string= matched-text "\\'") | |
"’") | |
;; Leading? | |
((string= matched-text "'") |
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
function shell_command_output (command) { | |
var error_text = ""; | |
var output_text = ""; | |
var exit_status = shell_command( | |
command, | |
$fds = [ | |
{ | |
output: | |
async_binary_string_writer("") | |
}, |
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
# -*- mode: snippet -*- | |
# name: add-to-list | |
# key: atl | |
# -- | |
(add-to-list '${1:list} ${2:element}${3: ${4:&optional append-flag$$(yas-choose-value '("nil" "'append"))}${5: #'${6:compare-fn}}})$0 |
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
clear Mod1 | |
clear Mod2 | |
clear Mod3 | |
clear Lock | |
!clear Mod4 | |
keycode 63 = Mode_switch | |
keycode 71 = Mode_switch | |
keycode 66 = Meta_L | |
keycode 69 = Meta_R | |
keycode 65 = Super_L |