Skip to content

Instantly share code, notes, and snippets.

@philcon93
philcon93 / 1.md
Last active October 17, 2019 04:24
enhancedgoogleanalytics

Enhanced Ecommerce Analytics

This code is how to measure a transaction with enhance ecomm instead of ecomm tracking

@jamtur01
jamtur01 / ladder.md
Last active February 17, 2025 09:09
Kickstarter Engineering Ladder
@mlakkadshaw
mlakkadshaw / install_sentry.sh
Created October 1, 2015 11:51 — forked from bjmc/install_sentry.sh
Basic setup script for installing Sentry (http://getsentry.com) + Redis on new Ubuntu 14.04 Amazon EC2 instance
#! /bin/bash
export RUN_AS='sentry';
export INSTALL_DIR='/var/www/sentry';
HOSTNAME='http://mysentry.example.com'; # No trailing slash
DB_HOST='something.rds.amazonaws.com';
DB_PORT='5432';
DB_USER='sentry';
DB_NAME='sentry';
DB_PASSWORD='DB_PASSWORD';
@cobyism
cobyism / gh-pages-deploy.md
Last active April 12, 2025 09:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@jorgebastida
jorgebastida / gist:1886036
Created February 22, 2012 17:01
Get credit card type by number
import re
def credit_card_type(number):
"""
Return a string that represents the type of the credit card number.
Criteria:
AMEX: Starts with 34 or 37 and the length 15.
MASTERCARD: Starts with 51-55 and the length is 16.