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:8586449
Created January 23, 2014 20:48
HB clucene info
brew info clucene
clucene: stable 0.9.21b, HEAD
http://clucene.sourceforge.net
/usr/local/Cellar/clucene/2.3.3.4 (302 files, 4.0M)
Built from source
/usr/local/Cellar/clucene/HEAD (302 files, 3.9M) *
Built from source
From: https://github.com/dhaley/homebrew/commits/master/Library/Formula/clucene.rb
@dhaley
dhaley / gist:8568004
Created January 22, 2014 21:47
Working dovecot + lucene (home-brew formula)
require 'formula'
class Dovecot < Formula
homepage 'http://dovecot.org/'
url 'http://dovecot.org/releases/2.2/dovecot-2.2.10.tar.gz'
mirror 'http://fossies.org/linux/misc/dovecot-2.2.10.tar.gz'
sha256 '75592483d40dc4f76cc3b41af40caa4be80478946a699d46846d5d03e4d2e09b'
@dhaley
dhaley / gist:8565894
Created January 22, 2014 19:40
Error: Compiling dovecot 2.2.10 with clucene 2.3.3.4
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib-mail -I../../../src/lib-index -I../../../src/lib-storage -I../../../src/plugins/fts -I../../../src/doveadm -I/usr/local/Cellar/clucene/2.3.3.4/lib -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 -c fts-backend-lucene.c -o fts-backend-lucene.o >/dev/null 2>&1
/bin/sh ../../../libtool --tag=CC --mode=link clang -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 -module -avoid-version -o lib20_doveadm_fts_lucene_plugin.la -rpath /usr/local/Cellar/dovecot/2.2.10/lib/dovecot/doveadm doveadm-fts-lucene.lo
libtool: link: clang -Wl,-undefined -Wl,dynamic_lookup -o .libs/lib20_doveadm_fts_lucene_plugin.so -bundle .libs/doveadm-fts-lucene.o -O2
lib
@dhaley
dhaley / homebrew_dovecote_clucene
Last active January 4, 2016 03:59
dovecot + clucene (homebrew recipe)
require 'formula'
class Dovecot < Formula
homepage 'http://dovecot.org/'
url 'http://dovecot.org/releases/2.2/dovecot-2.2.10.tar.gz'
mirror 'http://fossies.org/linux/misc/dovecot-2.2.10.tar.gz'
sha256 '75592483d40dc4f76cc3b41af40caa4be80478946a699d46846d5d03e4d2e09b'
def install
<?php
/**
* @Given /^I am viewing a product with the following related products:$/
*/
public function assertRelatedProducts(TableNode $relatedProducts) {
// First, create a product.
$product = (object) array(
'title' => 'Parent Product',
'type' => 'product',
'uid' => 1,
@dhaley
dhaley / gist:7356614
Created November 7, 2013 15:36
Express duplicate lines
~/d/r/c/c/p/cu_fit ❯❯❯ phpcpd .
phpcpd 1.4.3 by Sebastian Bergmann.
Found 106 exact clones with 1632 duplicated lines in 131 files:
- /Users/daha1836/data/code/dslm_base/profiles/cu_fit-1.3/modules/contrib/ckeditor/ckeditor/ckeditor_php4.php:220-228
/Users/daha1836/data/code/dslm_base/profiles/cu_fit-1.3/modules/contrib/ckeditor/ckeditor/ckeditor_php5.php:216-224
- /Users/daha1836/data/code/dslm_base/profiles/cu_fit-1.3/modules/contrib/ckeditor/ckeditor/ckeditor_php4.php:371-377
/Users/daha1836/data/code/dslm_base/profiles/cu_fit-1.3/modules/contrib/ckeditor/ckeditor/ckeditor_php5.php:365-371
@dhaley
dhaley / gist:7051447
Created October 19, 2013 03:48
browse to any site drupal 7 url
(defun cu-drupal-menu-browse ()
(interactive)
(let ((menu (completing-read "Browse: " d7-menus)))
(browse-url (concat base_url "/" menu))))
(bind-key "C-8 m b" 'cu-drupal-menu-browse)
(setq d7-menus '("admin" "batch" "gsearch" "home" "navigation404" "node"
"rss.xml" "shortcodes" "user" "block/%" "degree/%" "media/%" "node/%"
"overlay-ajax/%" "user/%" "wysiwyg/%" "about-us/fast-facts"
"about-us/people" "admin/appearance" "admin/compact" "admin/config"
@dhaley
dhaley / gist:7048561
Created October 18, 2013 21:30
Browsing drupal menus from Emacs IDE
;; browse drupal menus from emacs
(setq base_url (concat "http://ww/" cu-drupal-site-name))
(defun browse-drupal-menu (menu)
"browse specific menu path on drupal site"
(message (concat "browsing " menu))
(cond
((equal menu "login")
(message (concat base_url "/user"))
(browse-url (concat base_url "/user")))
((equal menu "add")
@dhaley
dhaley / gist:7027929
Created October 17, 2013 16:25
describe-function-via-pman
;; pman
;; sudo pear channel-update doc.php.net
;; sudo pear install doc.php.net/pman
(defun describe-function-via-pman (function)
"Display the full documentation of FUNCTION, using pman"
(interactive
(let (
(fn (intern-soft (thing-at-point 'symbol)
obarray))
@dhaley
dhaley / gist:6957072
Last active December 25, 2015 09:49
boris-loader drupal error
<h1>Additional uncaught exception thrown while handling exception.</h1>
<h2>Original</h2>
<p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in Symfony\Component\DependencyInjection\ContainerBuilder-&gt;createService() (line 959 of /Users/daha1836/data/releases/drupal8/8.x/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php).</p>
<h2>Additional</h2>
<p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in Symfony\Component\DependencyInjection\ContainerBuilder-&gt;createService() (line 959 of /Users/daha1836/data/releases/drupal8/8.x/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php).</p>
<hr />%