Skip to content

Instantly share code, notes, and snippets.

Not your keys, not your coins.

Steven Black StevenBlack

Not your keys, not your coins.
Block or report user

Report or block StevenBlack

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

Keybase proof

I hereby claim:

  • I am StevenBlack on github.
  • I am stevenblack ( on keybase.
  • I have a public key whose fingerprint is 1C52 CB4A 3BD9 EC28 E1BC DF99 8BC4 854E C83F 6EC6

To claim this, I am signing this object:

StevenBlack / gist:f5501b42dce78b047824
Last active Aug 29, 2015 — forked from Greyvy/gist:8872903
Arbitrary data passed to Jekyll partials
View gist:f5501b42dce78b047824
<!-- partial.html -->
<div class="Tile">
{% if include.title %}
<h1>{{ include.title }}</h1>
{% else %}
<h1>no content!</h1>
{% endif %}
</div><!-- .Tile -->
<!-- in any template, partial, layout or content file -->
# Source:
# Terminate Dropbox, then...
sudo chflags -R nouchg ~/Dropbox ~/.dropbox ~/.dropbox-master
sudo chown "$USER" "$HOME"
sudo chown -R "$USER" ~/Dropbox ~/.dropbox ~/.dropbox-master
sudo chmod -RN ~/.dropbox ~/Dropbox ~/.dropbox-master
StevenBlack / hooks.rb
Last active Aug 29, 2015
Basic hooks and anchors in Ruby.
View hooks.rb
class AbstractHook
@oHook = nil
def sethook( *args )
args.each { |arg|
if @hook.nil?
@hook = arg
@hook.sethook( arg )
StevenBlack / filledIn.js
Created Jan 31, 2010
View filledIn.js
jQuery custom selector that filters for input elements that have values, are checked, or are selected.
// Count the number of input items that are filled-in
( function( $ ){
// custom selector determines if an element is filled-in, checked, or selected.
$.expr[":"].filledIn = function( a ){
StevenBlack / jquery.headersAboveBelow.js
Created Mar 15, 2010
:headerBelow and :headerAbove
View jquery.headersAboveBelow.js
// jQuery custom selectors for headers above (lower <h> tag) or below (higher <h> tag) given an arbitrary level
(function( $ ) {
// selects all the headers below the passed index. So 2 matches <h3>, <h4>, <h5>.
headerBelow: function( elem, i, match ) {
if ( /h\d/i.test( elem.nodeName ) ) {
var level= parseInt( match[ 3 ], 10 ) + 1, str = "h["+ level +"-5]", re = new RegExp( str, "i" ), ret ;
return re.test( elem.nodeName );
return false;
View jQuery page template
<!DOCTYPE html>
<html lang="en">
<script src="" type="text/javascript"></script>
View jQuery-UI page template
<!DOCTYPE html>
<html lang="en">
<link type="text/css" href="" rel="stylesheet" />
body{ font: 75% "Trebuchet MS", sans-serif; margin: 50px;}
StevenBlack / roundCorner.js
Created Apr 9, 2010
Round corners plugin
View roundCorner.js
Rounded-corners plugin.
$(function() {
View jquery.specialEvents.Example.js
// Special events
// Special event definition.
$ = {
setup: function() {
// This is only done the first time a "click" event handler is bound,
// per-element.
$(this).css( 'cursor', 'pointer' );
You can’t perform that action at this time.