Skip to content

Instantly share code, notes, and snippets.

View boertel's full-sized avatar

Benjamin Oertel boertel

View GitHub Profile
@boertel
boertel / index.html
Last active December 18, 2015 16:19
Market Basket Lift
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="//punchtab.github.io/Punchdation/static/css/fonts.css" />
<style>
body {
font-family: "Bariol";
}
@boertel
boertel / disqus.js
Last active December 18, 2015 22:09
Integration with DISQUS
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<disqus_shortname>'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="//punchtab.github.io/Punchdation/static/css/punchdation/fonts.css" />
<style>
body {
font-family: "Bariol";
}
@boertel
boertel / index.html
Last active December 18, 2015 23:39
Trend
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="//punchtab.github.io/Punchdation/static/css/punchdation/fonts.css" />
<style>
body {
font-family: "Bariol";
}
@boertel
boertel / punchtab-getsatisfaction.html
Last active December 20, 2015 18:59
Get Satisfaction Integration
<script type="text/javascript" charset="utf-8">
window.ptReady = window.ptReady || [];
window.ptReady.push(function () {
PT.event.bind("getsatisfaction.topic.reply", function () {
_ptq.push(["reply", {points: 25}]);
});
PT.event.bind("getsatisfaction.topic.question", function () {
_ptq.push(["ask", {points: 25}]);
@boertel
boertel / gist:6707859
Last active December 23, 2015 23:09
Receipt upload
<form action="/api/v1/scanning/upload" method="POST" name="scanning" enctype="multipart/form-data">
<input type="hidden" name="key" value="<YOUR PUBLISHER KEY>" />
<input type="file" name="image" accept="image/*" capture="camera" id="image">
<button type="submit" style="display: none;">UPLOAD RECEIPT</button>
</form>
@boertel
boertel / gist:6813093
Created October 3, 2013 16:53
Custom notification
window.ptReady = window.ptReady || [];
window.ptReady.push(function () {
PT.event.bind("loyalty.earned", function (message) {
// message.activities : array of activities
// message.points : sum of points for each activities
});
});
@boertel
boertel / gist:7012425
Created October 16, 2013 18:24
Parallax for the header
var hero = document.getElementById("header"),
heroHeight = $(hero).outerHeight();
function updateScroll() {
scrollAmount = $(window).scrollTop();
if (scrollAmount <= heroHeight) {
hero.style['-webkit-transform'] = 'translate3d(0, ' + (scrollAmount / 2) + 'px, 0)';
} else if (scrollAmount <= heroHeight) {
$(self).css('top', (scrollAmount / 2) + 'px');
}
@boertel
boertel / splash.css
Last active December 28, 2015 10:59
Hide red ribbon after 5 seconds
#rwd_tab {
display: none !important;
}
#rwd_tab.shown {
display: block !important;
}
@boertel
boertel / sidebar.css
Last active August 29, 2015 13:56
Customize color of the header/icon and position
.pt-sidebar-header, .pt-sidebar-open {
background-color: <YOUR COLOR>; // #945BAA
}
.pt-sidebar-icon {
background-color: <YOUR COLOR>; // #764988
top: 0px; // 0px
}
.pt-sidebar {
background-color: <YOUR COLOR>; // #434343
}