Skip to content

Instantly share code, notes, and snippets.

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 / repairDropbox.sh
Created August 17, 2014 17:04
Fix Dropbox permissions
#!/bin/bash
sudo chflags -R nouchg ~/Dropbox ~/.dropbox ~/.dropbox-master
sudo chown "$USER" "$HOME"
sudo chown -R "$USER" ~/Dropbox ~/.dropbox ~/.dropbox-master
sudo chmod -RN ~/.dropbox ~/Dropbox ~/.dropbox-master
chmod -R u+rw ~/Dropbox ~/.dropbox ~/.dropbox-master
@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;
function simulate(element, eventName)
{
var options = extend(defaultOptions, arguments[2] || {});
var oEvent, eventType = null;
for (var name in eventMatchers)
{
if (eventMatchers[name].test(eventName)) { eventType = name; break; }
}