This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gulp from 'gulp'; | |
import plugins from 'gulp-load-plugins'; | |
import browser from 'browser-sync'; | |
import rimraf from 'rimraf'; | |
import panini from 'panini'; | |
import yargs from 'yargs'; | |
import lazypipe from 'lazypipe'; | |
import inky from 'inky'; | |
import fs from 'fs'; | |
import siphon from 'siphon-media-query'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"event": | |
{{ event | replace: "=>", ":" }}, | |
"customer": | |
{{ customer | replace: "=>", ":" }} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "What a fancy postcard", | |
"to": { | |
"name": "{{ customer.first_name }} {{ customer.last_name }}", | |
"address_line1": "{{ customer.address_1 }}", | |
"address_line2": "{{ customer.address_2 }}", | |
"address_city": "{{ customer.city }}", | |
"address_state": "{{ customer.State }}", | |
"address_zip": "{{ customer.zip }}", | |
"address_country": "US" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Add this file to a tests directory and name it netflix.js. | |
// 2. Create a docker container that mounts that directory | |
// docker run -it -d --name casper2 -v /mnt/user/tests:/tests rdpanek/casperjs bin/bash | |
// 3. Set up an hourly cron job by creating a new file | |
// #!/bin/bash | |
// docker exec casper2 casperjs /tests/netflix.js | |
// Then add a command to /etc/cron.hourly/speedtest to run this script in the container and chmod +x that file. | |
var casper = require('casper').create(); | |
casper.options.waitTimeout = 120000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#!/usr/bin/env node | |
var http = require("http"), | |
fs = require("fs"), | |
sys = require('sys'), | |
exec = require('child_process').exec; | |
var ENDPOINT="https://app.customer.io/api/v1/customers/"; | |
var SITEID="YOUR SITE ID"; | |
var APIKEY="YOUR API KEY"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if $_SESSION[user] ?> | |
<script type="text/javascript"> | |
_cio.identify({ | |
// Signed in user attributes | |
id: <?= $_SESSION[user][id] ?>, // Unique id for the currently signed in user in your application. | |
email:<?= $_SESSION[user][email] ?>, // Email of the currently signed in user. | |
created_at:<?= $_SESSION[user][created_at] ?>, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From the Discourse-Chef directory | |
SERVER="yourdomain.com" | |
# Install Instructions | |
librarian-chef install | |
# enter your password once and never again | |
ssh-copy-id root@$SERVER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
load 'deploy/assets' | |
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz | |
tar -xvzf ruby-1.9.3-p385.tar.gz | |
cd ruby-1.9.3-p385/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz | |
tar -xvzf ruby-1.9.3-p327.tar.gz | |
cd ruby-1.9.3-p327/ | |
./configure --prefix=/usr/local | |
make |
NewerOlder