Skip to content

Instantly share code, notes, and snippets.

@ngstigator
ngstigator / gist:1649171
Created January 20, 2012 19:39
OW ticket #195
function owdashboard_form_alter(&$form, $form_state, $form_id) {
if($form['#id'] == 'views-exposed-form-dashboard-partners-block-1') {
if (empty($_GET['account_status'])) {
$form_state['input']['account_status'] = 'inquiry';
}
}
}
brew install -V /usr/local/Library/Homebrew/formula.rb
Error: You cannot override Formula.brew
/usr/local/Library/Taps (master) $ brew install php53 --with-mysql --with-pgsql
==> Installing php53 dependency: gettext
==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/gettext-0.18.1.1.tar.gz
==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
patching file gettext-tools/configure
patching file gettext-tools/Makefile.in
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:1897: checking for Cygwin environment
configure:1913: /usr/bin/gcc-4.2 -c -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isystem /Developer/SDKs/MacOSX10.6.sdk/usr/include -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -I/usr/local/Cellar/readline/6.2.2/include -I/usr/local/Cellar/libxml2/2.8.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include -isysroot /Developer/SDKs/MacOSX10.6.sdk -isystem /Developer/SDKs/MacOSX10.6.sdk/usr/include -I/Developer/SDKs/MacOSX10.6.sdk/usr/include conftest.c 1>&5
configure: In function 'main':
configure:1909: error: '__CYGWIN32__' undeclared (first use in this function)
configure:1909: error: (Each undeclared identifier is reported only once
configure:1909: error: for each function it appears in.)
configure: failed prog
@ngstigator
ngstigator / gist:3429536
Created August 22, 2012 21:25
calendar-tweaks.js after JSHint
git diff themes/custom/fnfnext/js/calendar-tweaks.js
diff --git a/themes/custom/fnfnext/js/calendar-tweaks.js b/themes/custom/fnfnext/js/calendar-tweaks.js
index 4800379..32d789f 100644
--- a/themes/custom/fnfnext/js/calendar-tweaks.js
+++ b/themes/custom/fnfnext/js/calendar-tweaks.js
@@ -50,14 +50,14 @@ Drupal.behaviors.calendarTweaks = {
var event_days = get_event_days(events[i]);
for (var j = 0; j < event_days.length; j++) {
- var the_day = day_1.index() - 1 + event_days[j]
@ngstigator
ngstigator / gist:4200513
Created December 4, 2012 04:11
ProtectInternetFreedom facebook like using XFBML
<div id="fb-root"></div>
<?php // $link = $_SERVER['HTTP_HOST'] . request_uri(); ?>
<?php $link = "http://" . $_SERVER['HTTP_HOST']; ?>
<ul class="share-links">
<li>
<div class="fb-like" data-href="http://www.protectinternetfreedom.net" data-send="true" data-layout="box_count" data-width="450" data-show-faces="false" data-colorscheme="light"></div>
</li>
<li>
<a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical" data-url="<?php print $link; ?>" data-text="Protect Global #NetFreedom now:" data-via="theopenmedia" data-hashtags="itu">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
@ngstigator
ngstigator / gist:4534986
Created January 15, 2013 00:48
clean filefield_path run
$ drush scr cis_base.clean_files_dirs_and_db_entries.php
=======ORPHANED public FILES=======
deleting file: sites/default/files/interviews/audio/ID07-Aug8_2011-2of2.mp3
deleting file: sites/default/files/interviews/audio/ID02-Aug8_2011-1of1.mp3
deleting file: sites/default/files/interviews/audio/ID08-Aug16_2011-1of1.mp3
deleting file: sites/default/files/interviews/audio/ID06-Aug11_2011-2of2.mp3
deleting file: sites/default/files/interviews/audio/ID13-Aug17_2011-1of1.mp3
deleting file: sites/default/files/interviews/audio/ID04-Aug9_2011-1of2.mp3
deleting file: sites/default/files/interviews/audio/STE-000.mp3
@ngstigator
ngstigator / gist:4535188
Created January 15, 2013 01:24
filefield update
$ drush scr cis_base.update_filefield_paths.php
PHP Fatal error: Call to undefined function _filefield_paths_get_field_types() in /home/wahpeton/domains/stage.wahpeton.affinitybridge.com/public_html/profiles/iegcis/modules/features/cis_base/drush/cis_base.update_filefield_paths.php on line 6
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function _filefield_paths_get_field_types() in
/home/wahpeton/domains/stage.wahpeton.affinitybridge.com/public_html/profiles/iegcis/modules/features/cis_base/drush/cis_base.update_filefield_paths.php,
line 6
@ngstigator
ngstigator / gist:4561680
Created January 18, 2013 01:55
fmsd special chars output
OLD: Fisher_(animal).jpg
NEW: Fisher_-animal.jpg
OLD: Letter John Ahyasou.doc
NEW: Letter-John-Ahyasou.doc
OLD: Picture 23.png
NEW: Picture-23.png
OLD: 250px-Trüsche_Walchensee.jpg
NEW: 250px-Tr-sche_Walchensee.jpg
OLD: 200px-Fischotter,_Lutra_Lutra.JPG
NEW: 200px-Fischotter-_Lutra_Lutra.JPG
@ngstigator
ngstigator / gist:4561701
Created January 18, 2013 01:58
fmsd clean files db entries output
=======ORPHANED public FILES=======
deleting file: sites/default/files/fortmckay_banner_0.jpg
deleting file: sites/default/files/fortmckay_banner_1.jpg
deleting file: sites/default/files/Wahpeton-sunset_banner.jpg
deleting file: sites/default/files/fortmckay_home/fmsd_pic4.jpg
deleting file: sites/default/files/fortmckay_home/fmsd.png
deleting file: sites/default/files/fortmckay_home/fmsd_pic3.jpg
deleting file: sites/default/files/fortmckay_home/documents/FORT MCKAY SUSTAINABILITY DEPARTMENT.docx
deleting file: sites/default/files/fortmckay_home/documents/2012 05 16 industry protocol draft_KB.doc
deleting file: sites/default/files/fortmckay_home/documents/TT Project Update April 2012.docx