Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Runyon erunyon

View GitHub Profile
@erunyon
erunyon / passkit.rb
Last active February 7, 2022 15:32
Passkit Authentication
View passkit.rb
require "json"
require "httparty"
require 'jwt'
require 'pp'
KEY = "YOUR_KEY"
SECRET = "YOUR_SECRET"
PROG = "THE_PROGRAM_ID"
class Passkit
View keybase.md

Keybase proof

I hereby claim:

  • I am erunyon on github.
  • I am erunyon (https://keybase.io/erunyon) on keybase.
  • I have a public key whose fingerprint is 4FBF 15AE 6457 691D 7751 90C9 B717 D425 ECEE E281

To claim this, I am signing this object:

@erunyon
erunyon / Local and Offline Storage Examples.md
Last active August 29, 2015 14:26
List of sites using local and offline storage
View Wufoo fields example 1
var s = d.createElement(t), options = {
'userName':'foo',
'formHash':'stringofcharacters',
'autoResize':true,
'height':'877',
'async':true,
'host':'wufoo.com',
'header':'hide',
'defaultValues':'field1='+ screen.width + 'x' + screen.height +'&field2=' + navigator.userAgent,
'ssl':true
@erunyon
erunyon / gist:df2dead68c40a22a63dd
Created March 17, 2015 02:18
Wufoo fields example 3
View gist:df2dead68c40a22a63dd
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
@erunyon
erunyon / gist:c2f2680dbb9bf19b4e06
Last active August 29, 2015 14:17
Wufoo fields example 2
View gist:c2f2680dbb9bf19b4e06
var s = d.createElement(t), options = {
'userName':'foo',
'formHash':'stringofcharacters',
'autoResize':true,
'height':'877',
'async':true,
'host':'wufoo.com',
'header':'hide',
'defaultValues':'field1='+ getParameterByName('field1') + '&field2=' + getParameterByName('field2'),
'ssl':true
View gist:5509414
<p>News:</p>
<article>
<header>
<h1 class="entry-title"><a href="/news/hey-look-it-s-news/">Sample News Story</a></h1>
<h2 class="publish-info"><time class="pubdate" datetime="2010-08-31T10:00:00-05:00"><b>Published:</b> August 31, 2010</time></h2>
<h3 class="author"><b>Author:</b> Erik Runyon</h3>
</header>
</article>
<p>Events:</p>
@erunyon
erunyon / gist:5073909
Created March 3, 2013 00:28
Flexslider code to remove comments from slider images.
View gist:5073909
jQuery(function($){
var $flexslider = $('.flexslider'),
$slides = $flexslider.find('li'),
stripComment = function(string) {
return string.replace(/<!--/g, '').replace(/-->/g, '');
},
initItem = function(item) {
var $this = $(item);
if(!$this.hasClass('init')) {