Skip to content

Instantly share code, notes, and snippets.


Ryan Burnette ryanburnette

View GitHub Profile
ryanburnette / header.html
Last active Aug 29, 2015
Two versions of jQuery in a restrictive situation.
View header.html
<!-- At this point our environmental jQuery should have already loaded, we'll
assign it to a separate variable on the window and delete the dollar sign -->
window.jQuery142 = window.jQuery;
delete window.$;
<!-- Next, we'll load our next version of jQuery -->
<script src="//"></script>
View _syntax.sass
// Jekyll Pygments syntax highlighter styles
// Colors
$default: #FFFFFF
$background: #010101
$comment: #586E75
$error: #586E75
$generic: #93A1A1
$keyword: #859900
$literal: #93A1A1
View Gruntfile.js
module.exports = function(grunt) {
'use strict';
pkg: grunt.file.readJSON('package.json')
, coffeelint: {
app: ['./assets/javascripts/**/*.coffee']
View facebook_fetch_share_count.rb
require 'net/http'
require 'uri'
require 'json'
class FacebookFetchShareCount
attr_accessor :uri
attr_reader :shares
def initialize(uri)
@uri = uri
View get_with_params.rb
def get_with_params(domain,path,params)
res = Net::HTTP.get(domain, "#{path}?".concat(params.collect { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&'))) if not params.nil?
View Vagrantfile
hostname = "vagrant"
project = "project"
box = "ubuntu/trusty64"
cpus = `sysctl -n hw.ncpu`.to_i
memory = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
recipes = %w{essentials permissions}
Vagrant.configure(2) do |config| = box
config.vm.hostname = hostname
ryanburnette / gf_action.php
Created May 3, 2014
Add additional actions to a Gravity Forms submission in WordPress.
View gf_action.php
function do_something_else($entry, $form) {
// Gravity Forms has validated the data
// Our Custom Form Submitted via PHP will go here
add_action("gform_post_submission", "do_something_else", 10, 2);
View slugify.rb
def slugify(text)
text.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
View call_async.js
(function () {
var e
, s
, src = '//'
e = document.createElement('script');
e.async = true;
e.src = src;
You can’t perform that action at this time.