Skip to content

Instantly share code, notes, and snippets.

@scottious
scottious / snipcart_events.js
Last active April 6, 2020 19:46
Sending Snipcart enhanced ecommerce events with Google Tag Manager
//Making sure Snipcart is ready
document.addEventListener('snipcart.ready', function() {
//Subscribing to different events
Snipcart.events.on('item.added', (parsedCartItem) => {
itemAdded(parsedCartItem.result.item);
});
Snipcart.events.on('cart.confirmed', (cartConfirmResponse) => {
orderCompleted(cartConfirmResponse.cart);
@scottious
scottious / osx_at_command_sleep_off.md
Created September 14, 2015 03:20
Working while sleeping - using "at" command on osx

*Good for yosemite or snow leopard

  1. Edit the /System/Library/LaunchDaemons/com.apple.atrun.plist, change the disabled child node from true -> false.

  2. Unload the current /System/Library/LaunchDaemons/com.apple.atrun.plist with:

    sudo launchctl unload -F /System/Library/LaunchDaemons/com.apple.atrun.plist

Then load the edited version

@scottious
scottious / gist:0d99ea77daa041b28929
Created November 10, 2014 00:39
__git_ps1 command not found issue.

I've been having an issue with the following error appear in the prompt after upgrading to Yosemite. The solution was to source the git bash completion and prompt files from a local copy.

    curl -o ~/.git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
    curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh

Then in:

    vi ~/bash_profile

Add: