Skip to content

Instantly share code, notes, and snippets.

@austinpray
austinpray / servers.json
Last active August 29, 2015 14:03
ryan schema
{
"districts": [
{
"objectType": "district",
"code": "RISD",
"alert": false,
"servers": [
{
"objectType": "server",
"errors": 999,
server {
set $site_name birdforestry.com;
listen *:80;
server_name 162.243.214.186 staging.birdforestry.com;
access_log /srv/www/birdforestry.com/logs/birdforestry.com.access.log;
error_log /srv/www/birdforestry.com/logs/birdforestry.com.error.log;
root /srv/www/birdforestry.com/current/web;
index index.php;
function () {
return document.getElementById('app_name').value;
}
@austinpray
austinpray / isAcceptTermsChecked.js
Created August 17, 2014 16:36
Could you create a macro in GTM to pull the 'type' or 'name'? Currently the click doesn't have a uniquely identifiable value reporting in the data layer
function () {
return document.getElementsByName('accept_terms')[0].checked
}
@austinpray
austinpray / README.md
Last active August 29, 2015 14:05
He asked to be able to differentiate between "get more spaces" buttons (top vs. bottom) and do the same for the "create a lumo" buttons.
We couldn’t find that file to show.
@austinpray
austinpray / infusionsoftvaluepull.js
Last active August 29, 2015 14:06
infusionsoft value pull
function () {
if({{element}}.tagName.toLowerCase() === "form") {
var fName = {{element}}.children.namedItem("inf_form_name")
if(fName) {
return fName.value
} else {
return false;
}
} else {
return false;
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# look good
# set -g default-terminal "xterm-256color"
set-option -g default-command "reattach-to-user-namespace -l bash"
@austinpray
austinpray / index.js
Last active August 29, 2015 14:06
Kegs and Bottles
var kegsandbottles = (function () {
var temp;
var output = '';
var counter = 0;
var numbers = [5, 7];
var exports = function () {
exports.start();
};
var templates = {
@austinpray
austinpray / -
Created September 25, 2014 16:24
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
function determinant(m) {
var l = m.length - 1;
if(l === 0) {
return m[0][0];
} else {
if(l === 1) {
return m[0][0]*m[l][l]-m[0][l]*m[l][0];
} else {
return m.reduce(function (p, c, i, a) {
var sign = i % 2 === 0 ? 1 : -1;