Skip to content

Instantly share code, notes, and snippets.

@robballou
robballou / gist:a7aa247aa7bdfb3a1b2c
Last active July 8, 2021 09:54
Example stub-content function for Drupal Migrate with YAML files
<?php
/**
* Implements hook_drush_command().
*/
function example_drush_command() {
$commands = array();
$commands['stub-content'] = array(
'callback' => 'drush_stub_content',
@robballou
robballou / gist:3d80a1dc0bdaf966050c
Created May 6, 2014 19:52
Hide the wrap guide in Atom editor
.editor .wrap-guide {
display: none;
height: 0;
overflow: hidden;
}
@robballou
robballou / gist:ffee4b3927c63dd5e792
Created May 2, 2014 17:54
Enable/disable views in code
<?php
/**
* Disable a view or views
*
* @param mixed $disable_views
* An array of view machine names or a machine name to disable
*/
function example_disable_views($disable_views = array()) {
if (!is_array($disable_views)) {
$disable_views = array($disable_views);

Keybase proof

I hereby claim:

  • I am robballou on github.
  • I am rballou (https://keybase.io/rballou) on keybase.
  • I have a public key whose fingerprint is E74A 8772 D3C3 1E32 F158 843B C1E4 C268 BD49 DC68

To claim this, I am signing this object:

@robballou
robballou / gist:8791554
Created February 3, 2014 20:19
Twitter.com CSS stylesheet
div.component.newest-members-module {display:none;}
div.module.wtf-module.js-wtf-module.has-content {display:none;}
context www
context vagrant up
context vagrant ssh
context switch my-project
context git edit
context switch my-project
@robballou
robballou / graph.js
Created December 20, 2013 16:27
Step 2: save the graph to a file
require('fs');
require('d3');
var xmldom = require('xmldom');
var dataset = {
apples: [53245, 28479, 19697, 24037, 40245],
};
var width = 460,
height = 300,