Skip to content

Instantly share code, notes, and snippets.

@wizonesolutions
wizonesolutions / gist:1703350
Created January 30, 2012 08:31
Vagrant 0.9.4 Windows debug output
INFO vagrant: `vagrant` invoked: ["up"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#<Vagrant::Environment:0x4724268>)
INFO environment: - cwd: C:/Users/Kevin/devops/vagrant/jenkinsserver
INFO environment: Home path: C:/Users/Kevin/.vagrant.d
DEBUG vagrant: Loading environment
INFO environment: Loading configuration...
DEBUG loader: Set :default = "C:/Ruby187/lib/ruby/gems/1.8/gems/vagrant-0.9.4/config/default.rb"
DEBUG loader: Populating proc cache for "C:/Ruby187/lib/ruby/gems/1.8/gems/vagrant-0.9.4/config/default.rb"
DEBUG loader: Load procs for pathname: #<Pathname:C:/Ruby187/lib/ruby/gems/1.8/gems/vagrant-0.9.4/config/default.rb>
@wizonesolutions
wizonesolutions / gist:1706560
Created January 30, 2012 20:42
Code causing maximum call stack issue with InfiniteScroll
$viewSelector = $(
'.view.view-flag-featured'
);
if ($(".pager-last").find('a').attr('href') != undefined) {
// Get the number of pages from the Views Pager (Use the full pager, it will be hidden with .infinitescroll() anyway)
lastPageHref = $(".pager-last").find('a').attr('href').toString();
lastPageHref = lastPageHref.split("=");
numOfPages = parseInt(lastPageHref[1]);
@wizonesolutions
wizonesolutions / gist:1706584
Created January 30, 2012 20:45
Maximum call stack errors
Uncaught RangeError: Maximum call stack size exceeded
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
o.extend.o.fn.extend
@wizonesolutions
wizonesolutions / gist:1706671
Created January 30, 2012 21:01
Line causing maximum call stack exception
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){i
@wizonesolutions
wizonesolutions / pbcopy.1
Created May 5, 2012 01:57
libxml2 --with-python (how can I --disable-pain?)
> brew --config
HOMEBREW_VERSION: 0.9
HEAD: e00e99632f859013274653063e086a048bf668f5
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.2
INFO interface: info: Mounting shared folders...
[default] Mounting shared folders...
INFO interface: info: -- datadir: /data
[default] -- datadir: /data
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: printf /data (sudo=false)
DEBUG ssh: stdout: /data
DEBUG ssh: Exit status: 0
DEBUG linux: Shell expanded guest path: /data
DEBUG ssh: Re-using SSH connection.
@wizonesolutions
wizonesolutions / gist:2657961
Created May 11, 2012 06:44 — forked from rocketeerbkw/gist:1591483
Test Drupal FAPI does not receive date when name attribute is removed
<?php
function stripe_test_menu() {
$items = array();
$items['stripe-test'] = array(
'title' => t('Stripe Test'),
'page callback' => 'drupal_get_form',
'page arguments' => array('stripe_test_form'),
'access callback' => TRUE,
veewee vbox build 'ubuntu-10.04.4-server-amd64'
2012-05-18 14:13:06 -0500 - environment - [veewee] Environment initialized (#<Veewee::Environment:0x007fd629502fd8>)
2012-05-18 14:13:06 -0500 - environment - [veewee] - cwd : /Users/kevin/DevOps/veewee
2012-05-18 14:13:06 -0500 - environment - [veewee] - veewee_filename : Veeweefile
2012-05-18 14:13:06 -0500 - environment - [veewee] - loglevel : info
2012-05-18 14:13:06 -0500 - environment - [veewee] - definition_dir : /Users/kevin/DevOps/veewee/definitions
2012-05-18 14:13:06 -0500 - environment - [veewee] - template_path : ["/Users/kevin/DevOps/veewee/templates", "templates"]
2012-05-18 14:13:06 -0500 - environment - [veewee] - iso_dir : /Users/kevin/DevOps/veewee/iso
2012-05-18 14:13:06 -0500 - environment - [veewee] - validation_dir : /Users/kevin/DevOps/veewee/validation
2012-05-18 14:13:06 -0500 - environment - [veewee] - tmp_dir : /Users/kevin/DevOps/veewee/tmp
@wizonesolutions
wizonesolutions / cygwintest.sh
Created May 25, 2012 00:47
Test shell script for Cygwin
#!/bin/bash
if uname -s | GREP_OPTIONS="" \grep -iE 'cygwin|mingw' >/dev/null
then # no symlinks on Windows :(
echo "cygwin"
else
echo "other"
fi
@wizonesolutions
wizonesolutions / README.md
Last active December 10, 2015 04:28 — forked from anonymous/mymodule.install.php
Bridging code from Field Collection patched with earlier patches that provided revision support (ones that used item_id). Pick and choose the update logic that you need in your use case.

Bridging code from Field Collection patched with earlier patches that provided revision support (ones that used item_id). Pick and choose the update logic that you need in your use case.

Change the update numbers as is appropriate in your custom module. This should go in your .install file.

Update 7006 adds the archived field.

Update 7007 only applies if you used a version of the patch that made the primary key on the fields item_id instead of value like it used to be. It migrates data from field_data_(field name)item_id and field_revision(field name)_item_id ('item_id') to corresponding _value ('value') columns. You have to update your code to access Field Collections using 'value' instead of 'item_id' again. If you previously fixed it in reverse, you're basically undoing that.

Update 7008 drops the item_id column from the field tables, and it adds the item_id index to field_collection_item_revision that wasn't in all of the patches.