Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
.
├── assets
│   ├── images
│   ├── sass/less/stylus/css
├── lib
│   ├── actions
│   ├── components
│   │   ├── __tests__
│   │   │ └── Avatar.test.jsx
│   │   └── Avatar.jsx
@jedfoster
jedfoster / publish.sh
Created December 17, 2015 15:10 — forked from edrex/publish.sh
Upload static site to S3 with clean URLs
#!/bin/sh
# Be sure to set the index and 404 docs to "index" and "404" respectively in your bucket settings
# replace with your compile command
harp compile ./ ./out
# removes the html extension
for f in `ls out/*.html out/**/*.html`; do mv $f "${f%%.*}"; done
@jedfoster
jedfoster / webkitmediasource-is-type-supported.html
Last active September 1, 2015 13:53 — forked from granoeste/webkitmediasource-is-type-supported.html
[JavaScript][HTML5][MediaSource] MediaSource.isTypeSupported
<!DOCTYPE html>
<html>
<head>
<script>
window.MediaSource = window.MediaSource || window.WebKitMediaSource;
function testTypes(types) {
for (var i = 0; i < types.length; ++i)
console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i]));
}
@jedfoster
jedfoster / ext.vim
Last active August 29, 2015 14:11 — forked from sjl/ext.vim
" run command
" no stdin
" output displayed in "Press enter to continue" style
" current buffer untouched
:!uptime
" run command
" pipe range of text to command on stdin
" output replaces the range in the current buffer
:RANGE!grep foo

CONVENTION

Numbered Lists are tree nodes, bullet lists are leaves (i.e key-value pairs)

MULTILAYERCNTL

  1. GENERIC
  • LUNIT
  • TRACE
  • EPERP
@jedfoster
jedfoster / SassMeister-input-HTML.haml
Created February 5, 2014 20:26 — forked from a5e/SassMeister-input-HTML.haml
Generated by SassMeister.com.
%h1
= "π<sub> 300</sub>"
.pi
-(1..300).each do |j|
.digit
@jedfoster
jedfoster / SassMeister-input.scss
Created January 10, 2014 00:40 — forked from scottkellum/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Using Sass 3.3 maps as a way to change
// the output of mixins.
<h1>iOS 6 style switches with pure CSS</h1>
<label>Something <input type="checkbox" class="ios-switch" /></label>
<label>Pre-checked<input type="checkbox" class="ios-switch" checked /></label>
<label><input type="checkbox" class="ios-switch" />Label after control</label>
<label><input type="checkbox" class="ios-switch" checked />Another label after control</label>
<p>Check out the slide animation, even in WebKit versions that don’t support animation for pseudo-elements.
Verified to work in <strong>Chrome, Firefox, IE10</strong>, but could possibly work in many others.</p>
module Jekyll
require 'haml'
class HamlConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /haml/i
end
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh