Skip to content

Instantly share code, notes, and snippets.

/***************************************************************************************
* AdWords Countdown Ad Updater -- Find stale countdown ads and replace them with
* Ads that are updated with new dates.
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com or MixedMarketingArtist.com
****************************************************************************************/
var DESCRIPTION2_TEXT = "Sale Ends In"
@timelf123
timelf123 / gulp-upload-public-dist-to-amazon-cloudfront.js
Last active December 10, 2015 01:07
Gulp upload public distribution folder to cloudfront/s3
var gulp = require('gulp');
var cloudfront = require('gulp-cloudfront');
var awspublish = require('gulp-awspublish');
// AWS config object
var aws = {
'params': {
'Bucket': 'bucketname' // s3 bucket
},
'accessKeyId': 'yourAccessKeyId',
(function($) {
$.fn.popover.Constructor.prototype.show = function() {
var fallback_position = 'top';
var e = $.Event('show.bs.' + this.type);
if (this.hasContent() && this.enabled) {
if (e.isDefaultPrevented()) {
return;
}
@timelf123
timelf123 / gpgmutt.md
Last active August 29, 2015 14:25 — forked from bnagy/gpgmutt.md
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
var wordList = [
"a",
"aardvark",
"aback",
"abacus",
"abaft",
"abalone",
"abandon",
"abandoned",
"abase",
@timelf123
timelf123 / sixpack-production-setup.md
Created November 10, 2015 22:57 — forked from Valve/sixpack-production-setup.md
Sixpack, Gunicorn, Nginx, Supervisord, Ubuntu setup

1. Create a new EC2 instance, add TCP ports 22, 80 and 8080 to the security group

2. I did everything on Ubuntu 14.04.2 server 64bit
3. Log in
sudo apt-get update
sudo apt-get upgrade

redis

@timelf123
timelf123 / liveschemaupdate.js
Last active December 10, 2015 01:03
ExpressJS live schema updates example
/**
* ExpressJS live schema updates example
*/
app.set('schemaVersion', 1)
app.use( function( req, res, next ){
// If we're not on an authenticated route
if( ! req.user ){
next();
return;
@timelf123
timelf123 / Google Analytics Dashboards
Created December 10, 2015 01:06 — forked from underdown/Google Analytics Dashboards
Google Analytics Dashboards
Google Analytics Dashboards
Local Search Dashboard https://www.google.com/analytics/web/template?uid=gNhA6alsRsy9rFxKJSz2Ng http://localu.org/blog/how-to-segment-local-search-analytics/
https://econsultancy.com/blog/62828-10-useful-google-analytics-custom-dashboards/
@timelf123
timelf123 / elite-404-checker
Created December 10, 2015 01:17 — forked from derekmartinla/elite-404-checker
Elite Adwords Destination Url 404 Checker
var email_address = 'derek@wpromote.com';
function main() {
var urlList = runUrlReport();
urlList = _.uniq(urlList, function(item, key, url) {
return item.url;
});
var listOfBrokenUrls = [];
@timelf123
timelf123 / amazon-autocomplete
Created December 10, 2015 01:18 — forked from derekmartinla/amazon-autocomplete
Leverage Amazon To Find High Commercial Intent Keywords
/**********************************************************************************************************************
* Amazon Autocomplete Tool
* Leverage the Amazon Autocomplete feature to find highly commercial keyword opportunities.
* Export the results for efficient importing into Google Adwords
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com or MixedMarketingArtist.com
**********************************************************************************************************************/
var hashMapResults = {};