Skip to content

Instantly share code, notes, and snippets.

View becw's full-sized avatar

Bec White becw

View GitHub Profile
@becw
becw / README.md
Last active August 29, 2015 14:06
Elasticsearch vagrant configuration
@becw
becw / keybase.md
Created March 19, 2014 17:37
keybase.md

Keybase proof

I hereby claim:

  • I am becw on github.
  • I am becw (https://keybase.io/becw) on keybase.
  • I have a public key whose fingerprint is 7BD0 4396 7273 3D4E 8BCE DBB0 3FBD D567 AAC8 24A8

To claim this, I am signing this object:

@becw
becw / Vagrantfile
Last active December 16, 2015 07:18
LAMP server using Vagrant. This is a work in progress.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.provision :shell, :path => "vagrant-setup.sh"
config.vm.network :forwarded_port, guest: 80, host: 8080
@becw
becw / .gitignore
Created April 12, 2013 16:02
Default .gitignore #drupal7
# Exclude IDE management files.
# Eclipse
.project
.settings
.buildpath
# Netbeans
netbeans
@becw
becw / README.md
Last active December 16, 2015 01:58
ElasticSearch server using Vagrant
@becw
becw / example.install.php
Last active March 26, 2019 06:53
Enable/revert a feature in a Drupal update hook #drupal7
/**
* EXAMPLE FEATURE UPDATE
* Enable and revert the my_new_feature_name feature.
*/
function example_update_7001() {
// An array of new or changed features; the array keys are feature names,
// values are an array of exportable types as seen in a feature's .info file:
// features[field][] = node-page-body
$features = array(
'my_new_feature_name' => array('field', 'variable'),
@becw
becw / pinboard.bookmarklets.js
Created January 17, 2012 18:56
Pinboard bookmarklets for Google Reader
// Pinboard bookmarklets that work for expanded items in Google Reader as well
// as for web pages in general.
// BOOKMARKLET VERSIONS
// Pinboard, no tags, minified
javascript:(function(){var a,b;if(location.href.search(/^https?:\/\/(www.)?google.com\/reader\/.+$/)===0){var c=document.getElementById("current-entry");if(c&&c.className.search(/(^| )expanded( |$)/)!=-1){var d=c.getElementsByClassName("entry-title-link");if(d.length){a=d[0].getAttribute("href");b=d[0].firstChild.nodeValue}}}else{a=location.href;b=document.title}if(a){void open("http://pinboard.in/add?later=yes&noui=yes&jump=close&url="+encodeURIComponent(a)+"&title="+encodeURIComponent(b),"Pinboard","toolbar=no,width=100,height=100")}})()
// Pinboard, with tags, uglified