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:3107214
Created July 13, 2012 20:24
Default shortcut set export
diff --git a/modules/features/cu_bucket/cu_bucket.info b/modules/features/cu_bucket/cu_bucket.info
index b9b4690..23cc589 100644
--- a/modules/features/cu_bucket/cu_bucket.info
+++ b/modules/features/cu_bucket/cu_bucket.info
@@ -6,7 +6,10 @@ php = 5.2.4
dependencies[] = client_ui_control
dependencies[] = date
dependencies[] = features
+dependencies[] = menu
dependencies[] = strongarm
@dhaley
dhaley / gist:4694396
Created February 1, 2013 21:48
Emacs debugger info for flycheck parsing bug with phpcs checker
Debugger entered--Lisp error: (error "Unexpected root element nil")
signal(error ("Unexpected root element nil"))
error("Unexpected root element %s" nil)
(if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root)))
(let* ((root (flycheck-parse-xml-string output))) (if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root))) (-flatten (-keep (function flycheck-parse-checkstyle-file-node) (cddr root))))
flycheck-parse-checkstyle("\nFatal error: Call to undefined function iconv() in /opt/local/lib/php/PHP/CodeSniffer/Reports/Checkstyle.php on line 75\n" php-phpcs #<buffer foo3.php>)
funcall(flycheck-parse-checkstyle "\nFatal error: Call to undefined function iconv() in /opt/local/lib/php/PHP/CodeSniffer/Reports/Checkstyle.php on line 75\n" php-phpcs #<buffer foo3.php>)
(let* ((parser (or (flycheck-checker-error-parser checker) (quote flycheck-parse-output-with-patterns))) (errors (funcall parser output checker buffer))) (let ((list error
@dhaley
dhaley / lisp
Created February 1, 2013 22:25
flycheck phpcs checker error with Drupal Standard set
Debugger entered--Lisp error: (error "Unexpected root element nil")
signal(error ("Unexpected root element nil"))
error("Unexpected root element %s" nil)
(if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root)))
(let* ((root (flycheck-parse-xml-string output))) (if (eq (car root) (quote checkstyle)) nil (error "Unexpected root element %s" (car root))) (-flatten (-keep (function flycheck-parse-checkstyle-file-node) (cddr root))))
flycheck-parse-checkstyle("\nNotice: Use of undefined constant T_INLINE_ELSE - assumed 'T_INLINE_ELSE' in /Users/daha1836/.drush/coder/coder_sniffer/Drupal/Sniffs/Formatting/SpaceColonSniff.php on line 30\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<checkstyle version=\"1.4.0\">\n <file name=\"/private/var/folders/1w/gxywt3_x1hn919zq1jf0s41r7jzqvl/T/flycheck67210x_T.inc\">\n <error line=\"327\" column=\"1\" severity=\"error\" message=\"Missing parameter type at position 1\" source=\"Drupal.Commenting.FunctionComment.MissingParamType\"/>\n
@dhaley
dhaley / xml
Created February 4, 2013 17:53
phpcs output
-*- mode: compilation; default-directory: "~/data/releases/cu_vcr/current/" -*-
Compilation started at Mon Feb 4 10:48:57
phpcs --report\=checkstyle /Users/daha1836/data/releases/cu_vcr/current/foo.php
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.4.0">
<file name="/Users/daha1836/data/releases/cu_vcr/dev/foo.php">
<error line="4" column="1" severity="error" message="There must be exactly one blank line before the tags in file comment" source="PEAR.Commenting.FileComment.SpacingBeforeTags"/>
<error line="9" column="1" severity="warning" message="PHP version not specified" source="PEAR.Commenting.FileComment.MissingVersion"/>
<error line="9" column="1" severity="error" message="Missing @category tag in file comment" source="PEAR.Commenting.FileComment.MissingTag"/>
@dhaley
dhaley / php
Created February 4, 2013 17:56
drupal source file
<?php
/**
* @file
* A drupal cli execution script.
*
* Run drupal API hooks from the command line.
* This is useful before putting functionality in a site install.
*/
@dhaley
dhaley / xml
Created February 4, 2013 18:00
vcr_menu.install compilation errors
-*- mode: compilation; default-directory: "~/data/releases/cu_vcr/current/profiles/cu_vcr/modules/custom/vcr_menu/" -*-
Compilation started at Mon Feb 4 10:59:42
phpcs --report\=checkstyle /Users/daha1836/data/releases/cu_vcr/current/profiles/cu_vcr/modules/custom/vcr_menu/vcr_menu.install
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.4.0">
<file name="/Users/daha1836/data/releases/cu_vcr/dev/profiles/cu_vcr/modules/custom/vcr_menu/vcr_menu.install">
<error line="4" column="1" severity="error" message="There must be exactly one blank line before the tags in file comment" source="PEAR.Commenting.FileComment.SpacingBeforeTags"/>
<error line="9" column="1" severity="warning" message="PHP version not specified" source="PEAR.Commenting.FileComment.MissingVersion"/>
<error line="9" column="1" severity="error" message="Missing @category tag in file comment" source="PEAR.Commenting.FileComment.MissingTag"/>
@dhaley
dhaley / php
Created February 4, 2013 18:01
vcr_menu.install
<?php
/**
* @file
* Programmatically create VCR menus. Oh Yeah!
*
* Will create pages, menus and menu items, beans and more.
* More power!
*/
@dhaley
dhaley / php
Created February 4, 2013 18:04
phpcs config file
<?php
$phpCodeSnifferConfig = array (
'default_standard' => 'Drupal',
)
?>
@dhaley
dhaley / php
Created February 4, 2013 18:24
foo.php
<?php
/**
* @file
* A drupal cli execution script.
*
* Run drupal API hooks from the command line.
* This is useful before putting functionality in a site install.
*/
@dhaley
dhaley / xml
Created February 4, 2013 18:30
phpcs *Messages* output
Notice: Use of undefined constant T_INLINE_ELSE - assumed 'T_INLINE_ELSE' in /Users/daha1836/.drush/coder/coder_sniffer/Drupal/Sniffs/Formatting/SpaceColonSniff.php on line 30
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.4.0">
<file name="/private/var/folders/1w/gxywt3_x1hn919zq1jf0s41r7jzqvl/T/flycheck85008zY.inc">
<error line="327" column="1" severity="error" message="Missing parameter type at position 1" source="Drupal.Commenting.FunctionComment.MissingParamType"/>
<error line="329" column="1" severity="error" message="Missing parameter type at position 2" source="Drupal.Commenting.FunctionComment.MissingParamType"/>
<error line="337" column="6" severity="error" message="Line indented incorrectly; expected 6 spaces, found 5" source="Drupal.WhiteSpace.ScopeIndent.IncorrectExact"/>
<error line="382" column="1" severity="error" message="Missing parameter type at position 1" source="Drupal.Commenting.FunctionComment.MissingParamType"/>
<error line="384" column="1" severity="error" m