Skip to content

Instantly share code, notes, and snippets.

View TechNickAI's full-sized avatar
💭
Heart Centered Technology Leader

Nick Sullivan TechNickAI

💭
Heart Centered Technology Leader
View GitHub Profile
@TechNickAI
TechNickAI / pilotfish-snippet.html
Created September 5, 2012 21:39
Pilotfish tag on page
<script>
(function(w, d, S) {
w.Pilotfish || ((Pilotfish = function() {
Pilotfish.q.push(arguments);
}).q = []);
var p = d.createElement(S),
s = d.getElementsByTagName(S)[0];
p.src = (location.protocol === "https:" ? "https" : "http") + "://cdn.pilotfish.io/client/latest/pilotfish.min.js";
s.parentNode.insertBefore(p, s);
})(window, document, "script");
@TechNickAI
TechNickAI / gist:3740910
Created September 18, 2012 02:22
move subdirectory of repo to a new repo
#!/bin/bash
# abort on any errors
set -e
# be verbose
set -x
# Move a subdir to a new repo
# http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository
@TechNickAI
TechNickAI / gist:4208023
Created December 4, 2012 19:56
bash script for pulling files from all servers
#!/bin/bash
### Pulls files for a specific .gif into the local directory, uncompresses them,
### and creates a all.$gif.log file with all of the entries
if [ "$1" == "" ]; then
day=`date +%Y-%m-%d`
else
day=$1
fi
gif=sentry.gif
@TechNickAI
TechNickAI / gist:4312063
Created December 16, 2012 19:49
Personal Contact Information for members of the Westboro Baptist Church, as supplied by Anonymous.
USAWTFM is not associated with the group Anonymous. We are merely a mode of transportation for any and all news that is relevant to today’s world.
The hackivist group Anonymous has been so kind as to leak the personal contact information of Westboro Church members. With a special thanks to Vets Against the WBC.
#OPWestboro Membership List. updated October 22, 2012.
Westboro Baptist Church
3701 SW 12th St
Topeka, KS 66604
@TechNickAI
TechNickAI / gist:4382130
Created December 26, 2012 18:41
php script for github webhook
<?php
function output($log) {
echo $log . "\n";
file_put_contents('lastrun', $log);
}
$log = date('r') . "\n";
if (empty($_POST['payload'])) {
output($log . "No payload");
exit(1);
@TechNickAI
TechNickAI / gist:4416957
Last active December 10, 2015 09:49
Basic Template for AdSynth. It assumes the following files bootstrap are served from the root: /css/bootstrap.min.css /css/bootstrap-response.min.css /js/bootstrap.min.js /img/glyphicons-halflings-white.png /img/glyphicons-halflings.png These files are available from bootstrap: http://twitter.github.com/bootstrap/assets/bootstrap.zip
<!DOCTYPE html>
<html>
<title>AdSynth</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-responsive.min.css" rel="stylesheet">
<style type="text/css"> body { padding-top: 60px; padding-bottom: 40px; } </style>
<body>
@TechNickAI
TechNickAI / gist:4416982
Created December 31, 2012 02:41
HTML for bootstrap inline forms - see it in action here: http://adsynth-alerts.herokuapp.com/alerts/new
<!-- This goes in the form -->
<div class="control-group conditions">
</div>
<button type="button" class="btn btn-small add-condition">+</button>
<!-- This is the html for the individual line items, to be rendered by your favorite engine -->
<div class="alert-inline alert-condition form-inline" style="margin-bottom:10px;">
<input name="condition_subject" placeholder="Subject" required="true">
<select name="condition_operator">
@TechNickAI
TechNickAI / gist:4757100
Created February 11, 2013 19:57
Bookmarklet for control tag helper
javascript:(function(){(function(){var div=document.createElement("div");div.id="kxhelper-container";div.setAttribute("style","position: absolute; top: 15%; left: 15%; background-color: white");document.body.appendChild(div);div.innerHTML="Loading...";function loadScript(src){var s=document.createElement("script");s.src=src;var ref=document.getElementsByTagName('script')[0];ref.parentNode.insertBefore(s,ref);}var u=window.helperPluginUrl||"http://media.krxd.net/helper-plugin.js";loadScript(u+"?"+Math.random());})();})();
@TechNickAI
TechNickAI / gist:5198931
Created March 19, 2013 18:43
Rolepoint commit log
commit 5c496ad64ffb1af998352a04512b1b9ca148fcc7
Merge: aead06d ba9d57e
Author: Nick Sullivan <nick@sullivanflock.com>
Date: Sat Mar 16 19:26:23 2013 -0700
Fix conflict
commit aead06daa70d9a31836d712efdeb48e38679b613
Author: Nick Sullivan <nick@sullivanflock.com>
Date: Sat Mar 16 19:19:46 2013 -0700
@TechNickAI
TechNickAI / gist:7422423
Created November 11, 2013 23:21
Bookmarklet for previewing viewer controls
// Bookmarklet
javascript:(function(){(function loadScript(url){var script=document.createElement("script"),ref=document.getElementsByTagName('script')[0];script.src=url;ref.parentNode.insertBefore(script,ref);})("http://tpb.brightroll.com/js/viewer_controls.js?"+Math.random());})();
// Source
(function loadScript(url) {
var script = document.createElement("script"),
ref = document.getElementsByTagName('script')[0];
script.src = url;
ref.parentNode.insertBefore(script, ref);