Skip to content

Instantly share code, notes, and snippets.

View wcurtis's full-sized avatar

Bill Curtis wcurtis

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wcurtis on github.
  • I am wcurtis (https://keybase.io/wcurtis) on keybase.
  • I have a public key ASBw79MYtWw7yhr0f_IF_xgbWMwzr6_rHBbXDWwg9KCqKAo

To claim this, I am signing this object:

@wcurtis
wcurtis / inject-store-initializer.js
Created March 26, 2015 14:07
Inject store into Ember components
/**
* Adds store to components
* http://stackoverflow.com/a/18754349/540194
*/
export function initialize(container, application) {
application.inject('component', 'store', 'store:main');
}
export default {
name: 'inject-store',
@wcurtis
wcurtis / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wcurtis
wcurtis / input-tooltip.js
Created May 23, 2014 14:53
Ember component for adding Bootstrap tooltips to form inputs
/**
* InputTooltip makes it easy to add Bootstrap tooltips
* or popovers to your input fields in Ember
*
* Example Tooltip Usage:
*
* {{input-tooltip
* tooltip_title="I'm a tooltip bro"
* tooltip_placement="right"
* type="text"
@wcurtis
wcurtis / Lock.php
Created March 13, 2014 23:16
Magento Lock Model for Preventing Cron Job Overlap
<?php
/**
* Lock manager to ensure our cron doesn't run twice at the same time.
*
* Inspired by the lock mechanism in Mage_Index_Model_Process
*
* Usage:
*
* $lock = Mage::getModel('stcore/cron_lock');