Skip to content

Instantly share code, notes, and snippets.

View jgarber623's full-sized avatar
:atom:

Jason Garber jgarber623

:atom:
View GitHub Profile
@jgarber623
jgarber623 / delicious.html
Created December 2, 2014 06:07
A sample of the Netscape Bookmark File Format as exported from Delicious.
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><A HREF="https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html#//apple_ref/doc/-%20uid/TP40014508" ADD_DATE="1414706885" PRIVATE="0" TAGS="javascript,mac,osx,yosemite">JavaScript for Automation Release Notes</A>
<DD>This article describes JavaScript for Automation, a new feature in OS X Yosemite.
@jgarber623
jgarber623 / FrancisCMS Import Scripts.md
Last active August 29, 2015 14:10
Useful scripts for converting and preparing data for FrancisCMS.

Detailed instructions on how to use these scripts coming soon!

@jgarber623
jgarber623 / aaronparecki.com.html
Created August 28, 2014 19:16
Microformats comments examples
<li data-url="http://waterpigs.co.uk/notes/4WXEyS/" id="external_http_waterpigs_co_uk_notes_4WXEyS_" class="h-cite">
<div class="inner">
<div class="minicard h-card vcard author p-author">
<div style="position: relative; width: 48px; height: 48px; float: left; margin-right: 6px;">
<img width="48" alt="Barnaby Walters" src="http://waterpigs.co.uk/photo.jpg" class="photo logo u-photo">
</div>
<a class="u-url" href="http://waterpigs.co.uk">waterpigs.co.uk</a>
<a href="http://waterpigs.co.uk" class="p-name fn value name">Barnaby Walters</a>
</div>
<div class="quote-text">
@jgarber623
jgarber623 / tag_page_generator.rb
Last active August 29, 2015 14:05
Generate tag pages in Jekyll at /tags/tag_name_with_underscores/index.html.
module Jekyll
class TagPage < Page
def initialize(site, base, dir, data = {})
@site = site
@base = base
@dir = dir
@name = 'index.html'
data['layout'] = 'posts-list'
data['title'] = "Posts tagged “#{data['tag']}”"

Keybase proof

I hereby claim:

  • I am jgarber623 on github.
  • I am jgarber (https://keybase.io/jgarber) on keybase.
  • I have a public key whose fingerprint is 35A3 1BAF B39E 1B75 7C44 AD51 9B42 99FC 6226 685E

To claim this, I am signing this object:

@jgarber623
jgarber623 / _profile-links.scss
Created October 14, 2013 22:21
Sass 3.3 adds a new SassScript Maps feature that's super handy.
@jgarber623
jgarber623 / _mixins.scss
Created May 3, 2012 03:06
My collection of SASS/Compass mixins
// display: block
@mixin block( $width: 0, $height: 0 ) {
display: block;
height: $height;
width: $width;
}
// CSS3: backface-visibility
@mixin backface-visibility( $style: visible ) {
@jgarber623
jgarber623 / _layout.php
Created May 1, 2012 15:21
Basic layout/view-style templating with PHP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo $page_title; ?></title>
</head>
<body>
<?php echo $content_for_layout; ?>
@jgarber623
jgarber623 / complicated_regex_example.js
Created December 1, 2011 19:48
An obtuse Regular Expression that'll replace indices in input @name and @id attributes in multi-model Rails forms
// RegExplanation: Match last occurrence of "_<string>_" and replace with "_<new_string>_"
some_string.replace( /^(.*)_.+_(.*?)$/, "$1_" + new_fields_index + "_$2" ),
// RegExplanation: Match last occurrence of "][<string>][" and replace with "][<new_string>]["
some_string.replace( /^(.*)\]\[.+\]\[(.*?)$/, "$1\]\[" + new_fields_index + "\]\[$2" )
@jgarber623
jgarber623 / date_utils.js
Created December 1, 2011 19:44
A couple of JS date utilities I used on a recent project
var date_utils = {
shift: function( date_obj, delta_in_days ) {
return new Date( date_obj.getTime() + ( delta_in_days * 86400000 ) );
},
epochTime: function( date_obj ) {
return date_obj.getTime();
}
}