Skip to content

Instantly share code, notes, and snippets.

View jlong's full-sized avatar
🚀

John W. Long jlong

🚀
View GitHub Profile
@jlong
jlong / SassMeister-input.scss
Created January 14, 2014 15:53
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$sections: red, gold, orange, grey;
@each $i in $sections {
.section-#{$i} {
@jlong
jlong / jquery.preparetransition.js
Last active December 28, 2016 13:56
A new version of $(el).prepareTransition() that uses a timer instead of the poorly implemented TransitionEnd event to ensure that the 'is-transitioning' class is removed.
/**
* prepareTransition
*
* jQuery Plugin for ensuring transitions with display:none or visibility:hidden
* are in the right state until the end of the transition
*
* By John W. Long (http://wiseheartdesign.com)
* April 18, 2013
*
* Based on the prepareTransition plugin by Jonathan Snook (http://snook.ca). This version
# Extension in my Rails lib dir
require 'lib/extensions/sass_widget_image_url'
# This configuration file works with both the Compass command line tool and within Rails.
project_type = :rails
# Require any additional compass plugins here.
require 'susy'
//
// Sass rotation mixin for IE6+
//
@mixin ms-rotate($degrees) {
@if (not unitless($degrees)) { $degrees: $degrees / 1deg }
$deg2rad: pi() * 2 / 360;
$radians: $degrees * $deg2rad;
$costheta: cos($radians);
$sintheta: sin($radians);
@jlong
jlong / flags.scss
Created September 4, 2012 21:14
Flags?
// Contrived example:
@mixin text-shadow($value, !important) {
text-shadow: $value $important;
}
a {
@include text-shadow(none) !important;
}
@jlong
jlong / grids.sass
Created August 14, 2012 21:40
Grids
// Grids
=grids($max-columns: 10)
#{enumerate(".grid", 2, $max-columns)}
+clearfix
@for $columns from 2 through $max-columns
.grid-#{$columns}
+grid($columns)
#{enumerate('.span', 1, $max-columns)}
diff --git a/source/docs/index.html b/source/docs/index.html
index da07196..e81e6ac 100644
--- a/source/docs/index.html
+++ b/source/docs/index.html
@@ -45,7 +45,7 @@ sidebar: false
$('.articles li').each(function() {
var li = $(this), a = li.find('a');
- if (expression.test(li.text()) || expression.test(a.attr('data-search-meta'))) {
+ if ((li.text().search(expression) > -1) || (('' + a.attr('data-search-meta')).search(expression) > -1)) {
@jlong
jlong / create_forum.rb
Created May 24, 2012 12:57
Creating a forum with the UserVoice API
#! /usr/bin/env ruby
require 'rubygems'
require "oauth"
require 'json'
# Trusted Client
KEY = 'CLIENT KEY'
SECRET = 'CLIENT SECRET'
SITE = 'http://your_subdomain.uservoice.com'
@jlong
jlong / tickets.rb
Created May 24, 2012 12:55
Creating and listing tickets with the UserVoice API
# helper method
def symbolize_hash(hash)
symbolized_hash = {}
# puts hash.inspect
hash.each do |key, value|
symbolized_hash[key.to_sym] = value
end
return symbolized_hash
end
@jlong
jlong / create_user.rb
Created May 24, 2012 12:41
Creating a user with the UserVoice API
#!/usr/bin/env ruby
require 'rubygems'
require "oauth"
require 'json'
def symbolize_hash(hash)
symbolized_hash = {}
puts hash.inspect