Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@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
@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]));
}
@Dirklectisch
Dirklectisch / git.plist
Created January 20, 2011 21:01
Property list used to launch a Git Daemon on Mac OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UserName</key>
<string>git</string>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>git</string>
@trekdemo
trekdemo / shell
Created February 16, 2011 10:56
Diff files selected in the TextMate drawer with Kaleidoscope
sudo ln -s /usr/local/bin/ksdiff /usr/bin/ksdiff
#!/usr/bin/ruby
require 'time'
def format_time(seconds)
hours = (seconds / 3600).to_i
minutes = ((seconds % 3600) / 60).to_i
seconds = (seconds % 60).to_i
minutes = "0#{minutes}" if minutes < 10
seconds = "0#{seconds}" if seconds < 10
@calebhearth
calebhearth / gist:4625280
Created January 24, 2013 17:15
Switch back and forth between directories and git branches, and even merge the last branch you were on, with hyphen!
~/
↪ cd code/project
project[master]/
↪ cd -
~/
↪ cd code/project
project[master]/

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red Violets are blue

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

<ul class="matrix">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
@jedfoster
jedfoster / SassMeister-input-HTML.haml
Created January 1, 2014 23:56
Generated by SassMeister.com.
%ul.matrix
- (0..19).each do |c|
%li