Skip to content

Instantly share code, notes, and snippets.

Ryan Burnette ryanburnette

Block or report user

Report or block ryanburnette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nazgob
nazgob / hello_node.js
Created Apr 24, 2011
node.js echo request server
View hello_node.js
var http = require('http'),
sys = require('sys');
var server = http.createServer(function(request, response) {
request.addListener('end', function() {
response.writeHead(200, {
'Content-Type': 'text/plain'
});
response.write(sys.inspect(request));
response.end();
@tbjers
tbjers / bitly_filter.rb
Created Aug 15, 2012
Liquid Filter to convert URLs to short URLs automatically
View bitly_filter.rb
require 'bitly'
module Jekyll
class BitlyFilterCache
def initialize
@result_cache = {}
config = Jekyll.configuration({})
@username = config['bitly']['username']
@key = config['bitly']['api_key']
Bitly.use_api_version_3
View gist:3761074
// global colour variables:
@blue = #3CF;
@red = #DF1F45
#content {
background: #eee;
padding: 25px;
@mirisuzanne
mirisuzanne / pop-stripe.md
Created Jul 19, 2012 — forked from jina/pop-stripe.md
Rainbow stripe mixin with SCSS + Compass
View pop-stripe.md

Rainbow stripe mixin with SCSS + Compass

I'm trying to make a horizontal rainbow stripe background gradient mixin, but I feel like this is way too verbose. How can it be better?

Goals:

  1. [check] Use variables for colors so they can be swapped out for different colors.
  2. [check] The widths are hard coded for 8 colors. Can it be done smarter where it adjusts to the number of colors you add? Or is that asking too much?
  3. [check] The colors are defined twice for the color starts and stops. Can this be done better?
  4. [see below] Right now I define the colors as variables at the top level, then pass them in the mixin. Should they instead be created inside the mixin and then colors are brought in as arguments? Or does that matter?
View slim-html5-boilerplate
doctype html
/[if lt IE 7]
html.no-js.ie6.oldie lang="en"
/[if IE 7]
html.no-js.ie7.oldie lang="en"
/[if IE 8]
html.no-js.ie8.oldie lang="en"
/[if gte IE 8]
html.no-js lang="en"
head
View _syntax.sass
// Jekyll Pygments syntax highlighter styles
// Color scheme
$base03: #002B36
$base02: #073642
$base01: #586E75
$base00: #657B83
$base0: #839496
$base1: #93A1A1
$base2: #EEE8D5
@westonruter
westonruter / gist:5475349
Last active Feb 6, 2017 — forked from markjaquith/gist:2653957
WordPress Fragment Caching convenience wrapper
View gist:5475349
<?php
/*
Usage:
cache_fragment_output( 'unique-key', 3600, function () {
functions_that_do_stuff_live();
these_should_echo();
});
*/
function cache_fragment_output( $key, $ttl, $function ) {
@dhm116
dhm116 / ie.shims.js
Created Feb 10, 2012
IE7/8 Javascript method shims
View ie.shims.js
'use strict';
// Add ECMA262-5 method binding if not supported natively
//
if (!('bind' in Function.prototype)) {
Function.prototype.bind= function(owner) {
var that= this;
if (arguments.length<=1) {
return function() {
return that.apply(owner, arguments);
You can’t perform that action at this time.