Skip to content

Instantly share code, notes, and snippets.

View oddnavy's full-sized avatar

David Pike oddnavy

View GitHub Profile
@oddnavy
oddnavy / user-tracker.js
Created February 23, 2018 00:34
User Tracker - Roughly follows the Google Analytics tracker implementation
import { pick } from 'lodash';
import Cookies from 'js-cookie';
import queryString from 'query-string';
const utmParams = [
'utm_source',
'utm_medium',
'utm_campaign',
'utm_term',
'utm_content',
{
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"default_line_ending": "LF",
"dictionary": "Packages/Language - English/en_GB.dic",
"enable_tab_scrolling": false,
"auto_indent": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"font_face": "Source Code Pro",
"font_size": 12,
// ✅ Working
const trackViewProduct = async product => {
AppEventsLogger.logEvent('fb_mobile_content_view', {
fb_content_id: product.plu,
fb_content_type: 'product',
fb_currency: 'AUD',
});
};
// ✅ Working
@oddnavy
oddnavy / gist:036a1f22c18398bbf0d93291e3141d14
Created October 25, 2021 03:49
Sync assets between to S3 buckets
// sync between production source and staging destination
aws-vault exec project -- aws s3 sync s3://assets.project.com s3://staging-assets.project.com --acl public-read
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
brew "asdf"
brew "gh"
brew "git"
brew "mackup"
brew "mas"
brew "zsh"
cask "github"
# Path to your oh-my-zsh installation.
export ZSH="/Users/xxx/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
ZSH_DISABLE_COMPFIX="true"
ENABLE_CORRECTION="false"