Skip to content

Instantly share code, notes, and snippets.

View dhaley's full-sized avatar

Damon Haley dhaley

  • National Renewable Energy Laboratory
  • Lafayette, CO
View GitHub Profile
@dhaley
dhaley / gist:5688333
Last active December 17, 2015 23:19
drush eshell completion
;;**** Drush Completion
(defun pcmpl-drush-commands ()
"Return the most common drush commands by parsing the drush output."
(with-temp-buffer
(call-process-shell-command "drush" nil (current-buffer) nil
"--early=includes/complete.inc")
(goto-char 0)
(let (commands)
@dhaley
dhaley / gist:5688448
Last active December 17, 2015 23:19
drush.complete.sh
#!/bin/bash
# BASH completion script for Drush.
#
# Place this in your /etc/bash_completion.d/ directory or source it from your
# ~/.bash_completion or ~/.bash_profile files. Alternatively, source
# examples/example.bashrc instead, as it will automatically find and source
# this file.
# Ensure drush is available.
@dhaley
dhaley / gist:5707041
Created June 4, 2013 15:51
php-auto-yasnippet config
(use-package php-auto-yasnippets
:config
(progn
(setq php-auto-yasnippet-php-program
"/Users/daha1836/.emacs.d/site-lisp/php-auto-yasnippets/Create-PHP-YASnippet.php")
(define-key php-mode-map (kbd "C-c C-y") 'yas/create-php-snippet)
))
@dhaley
dhaley / gist:5707074
Created June 4, 2013 15:53
yas/create-php-snippet debug
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("[ \f \n
]+" nil 0)
split-string(nil)
(let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) ""))) (call-process php-executable nil (current-buffer) nil php-auto-yasnippet-php-program function-or-method-name class-name))
(progn (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) ""))) (call-process php-executable nil (current-buffer) nil php-auto-yasnippet-php-program function-or-method-name class-name)))
(unwind-protect (progn (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) ""))) (call-process php-executable nil (current-buffer) nil php-auto-yasnippet-php-program function-or-method-name class-name))) (set-match-data save-match-data-internal (quote evaporate)))
(let ((save-match-data-internal (m
@dhaley
dhaley / gist:5775975
Last active December 18, 2015 11:29
configure pigeonhole
daha1836@haley:/usr/local/src/dovecot-2.2-pigeonhole-0.4.0% ./configure --prefix=/usr/local/Cellar/pigeonhole/0.4.0 --with-dovecot=/usr/local/Cellar/dovecot/2.2.2/lib/dovecot
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... none
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
@dhaley
dhaley / gist:5776051
Created June 13, 2013 18:19
sieve compile error
make
make all-recursive
Making all in src
Making all in lib-sieve
Making all in plugins
Making all in vacation
/bin/sh ../../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I./../../ -I/usr/local/Cellar/dovecot/2.2.2/include/dovecot -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -MT cmd-vacation.lo -MD -MP -MF .deps/cmd-vacation.Tpo -c -o cmd-vacation.lo cmd-vacation.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../.. -I./../../ -I/usr/local/Cellar/dovecot/2.2.2/include/dovecot -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -MT cmd-vacation.lo -MD -MP -MF .deps/cmd-vacation.Tpo -c cmd-vacation.c -fno-common -DPIC -o .libs/cmd-vacation.o
cc1: error: unrecognized command line option "-Wno-dupli
@dhaley
dhaley / gist:5799918
Last active December 18, 2015 14:49
php-extras backtrace
Debugger entered--Lisp error: (void-variable php-extras-insert-previous-variable-key)
(lookup-key php-mode-map php-extras-insert-previous-variable-key)
(eq (lookup-key php-mode-map php-extras-insert-previous-variable-key) (quote php-extras-insert-previous-variable))
(if (eq (lookup-key php-mode-map php-extras-insert-previous-variable-key) (quote php-extras-insert-previous-variable)) (progn (define-key php-mode-map php-extras-insert-previous-variable-key (quote undefined))))
(progn (if (eq (lookup-key php-mode-map php-extras-insert-previous-variable-key) (quote php-extras-insert-previous-variable)) (progn (define-key php-mode-map php-extras-insert-previous-variable-key (quote undefined)))) (define-key php-mode-map value (quote php-extras-insert-previous-variable)))
(if (boundp (quote php-mode-map)) (progn (if (eq (lookup-key php-mode-map php-extras-insert-previous-variable-key) (quote php-extras-insert-previous-variable)) (progn (define-key php-mode-map php-extras-insert-previous-variable-key (quote
@dhaley
dhaley / gist:5851985
Created June 24, 2013 17:45
drupal-mode utf8 error
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p [utf-8-unix utf-8-dos utf-8-mac])
/=([utf-8-unix utf-8-dos utf-8-mac] 0)
(and drupal-mode drupal-convert-line-ending (/= (coding-system-eol-type buffer-file-coding-system) 0))
(if (and drupal-mode drupal-convert-line-ending (/= (coding-system-eol-type buffer-file-coding-system) 0)) (progn (if (or (eq drupal-convert-line-ending t) (y-or-n-p "Convert to unix style line endings?")) (progn (message "Coding system conversion") (set-buffer-file-coding-system (quote unix))) (progn (setq drupal-convert-line-ending nil)))))
drupal-convert-line-ending()
run-hooks(before-save-hook)
basic-save-buffer()
save-buffer(1)
call-interactively(save-buffer nil nil)
@dhaley
dhaley / gist:5860753
Created June 25, 2013 17:59
pcomplete-drush-commands
(defun drupal/pcomplete-drush-commands ()
"Return the most common drush commands by parsing the drush output."
(when drupal-drush-program
(with-temp-buffer
(let ((default-directory
"/Users/daha1836/data/releases/cu_registrar/dev"))
(call-process drupal-drush-program nil t nil
"--early=includes/complete.inc")
(goto-char 0)
(let (commands)
@dhaley
dhaley / gist:5870017
Last active December 19, 2015 00:39
jira soap login issue
Debugger entered--Lisp error: (error "Error retrieving WSDL: 400")
signal(error ("Error retrieving WSDL: 400"))
error("Error retrieving WSDL: %s" 400)
soap-load-wsdl-from-url("https://cuboulder.atlassian.net/rpc/soap/jirasoapservice-v2?wsdl")
(setq jiralib-wsdl (soap-load-wsdl-from-url (if (string-equal jiralib-wsdl-descriptor-url "") (concat jiralib-url "/rpc/soap/jirasoapservice-v2?wsdl") jiralib-wsdl-descriptor-url)))
jiralib-load-wsdl()
(if jiralib-wsdl nil (jiralib-load-wsdl))
jiralib-login("foo" "foo")
call-interactively(jiralib-login)
ido-hacks-execute-extended-command(nil)