Skip to content

Instantly share code, notes, and snippets.

View joshuapekera's full-sized avatar

Joshua Pekera joshuapekera

View GitHub Profile
@joshuapekera
joshuapekera / bootstrap-scrollspy-horizontal.js
Created April 20, 2012 23:17 — forked from marcoleong/bootstrap-scrollspy-horizontal.js
Modified bootstrap-scrollspy.js to support horizontal scroll.
/* =============================================================
* bootstrap-scrollspy.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@joshuapekera
joshuapekera / Asynchronous Facebook Twitter Google buttons and Google Analytics Social Tracking This .js file will render HTML5 social buttons asynchronously as well as bind callbacks to Google Analytics. Twitter Follow Action and Facebook Comment tracking included.
window.fbAsyncInit = function() {
FB.init({
appId : '123456', // ENTER your FB App ID
//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
_ga.trackFacebook(); //Google Analytics tracking
@joshuapekera
joshuapekera / gist:2571235
Created May 1, 2012 20:46 — forked from yahelc/gist:1004702
Simpler Twitter Intents / Google Analytics Script
(function(){
var event_names = {
"click" : "" ,
"tweet" : "",
"retweet" : "source_tweet_id",
"follow" : "screen_name",
"favorite" : "tweet_id"
};
for(var event_name in event_names)
@joshuapekera
joshuapekera / Asynchronous Facebook Twitter Google buttons and Google Analytics Social Tracking
Created May 3, 2012 00:49
This .js file will render HTML5 social buttons asynchronously as well as bind callbacks to Google Analytics. Supports Facebook and Twitter interaction tracking and Facebook Comment tracking.
// Facebook Social Tracking
window.fbAsyncInit = function() {
FB.init({
appId : '123456789', // ENTER your FB App ID
channelUrl : 'WWW.YOUR_DOMAIN.COM', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
/**
*
* Find more about the slide down menu at
* http://cubiq.org/slide-in-menu
*
* Copyright (c) 2010 Matteo Spinelli, http://cubiq.org/
* Released under MIT license
* http://cubiq.org/dropbox/mit-license.txt
*
* Version 0.1beta1 - Last updated: 2010.05.28
@joshuapekera
joshuapekera / ios-scroll.js
Created May 18, 2012 07:57 — forked from davegurnell/ios-scroll.js
iOS HTML5 Scrollpane
/* iOS scrollpane jQuery plugin, v1.0
* ==================================
*
* (c) 2011 Dave Gurnell
* http://boxandarrow.com
*
* Distributed under the Creative Commons Attribution 3.0 Unported licence:
* http://creativecommons.org/licenses/by/3.0/
*/
@joshuapekera
joshuapekera / StripeTutorialPage.html
Created May 21, 2012 06:38 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@joshuapekera
joshuapekera / jquery
Created May 24, 2012 04:18 — forked from rodi01/jquery
Animated Page Scroll with jQuery
$('.scrollPage').click(function() {
var elementClicked = $(this).attr("href");
var destination = $(elementClicked).offset().top;
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
return false;
});
@joshuapekera
joshuapekera / bootstraped-tumblr-theme.html
Created May 26, 2012 04:42 — forked from atiw003/bootstraped-tumblr-theme.html
bootstrap tumblr theme for quickredthought.tumblr.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{Title}</title>
<link rel='icon' href='{Favicon}'>
<link rel='shortcut icon' href='{Favicon}'>
<link rel='alternate' type='application/rss+xml' href='{RSS}'>
<meta name='description' content='{MetaDescription}'>
<meta name='color:Link' content='#6699cc'>
@joshuapekera
joshuapekera / html5-data.js
Created June 2, 2012 19:51 — forked from remy/html5-data.js
data-* support
(function () {
var forEach = [].forEach,
regex = /^data-(.+)/,
dashChar = /\-([a-z])/ig,
el = document.createElement('div'),
mutationSupported = false,
match
;
function detectMutation() {