Skip to content

Instantly share code, notes, and snippets.

@bak
bak / reset.sass
Created October 22, 2008 06:27
Eric Meyer's reset.css expressed in sass
// http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded
// Copyright 1995-2007 Eric A. and Kathryn S. Meyer
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
@bak
bak / gist:27806
Created November 22, 2008 11:26
Drew McLellan's bookmarklet to insert any png into the DOM of a site as an apple-touch-icon
javascript:var%20links=document.getElementsByTagName('head')[0].getElementsByTagName('link');for(var%20i=0;i%3Clinks.length;i++){if(links[i].getAttribute('rel')=='apple-touch-icon'){links[i].parentNode.removeChild(links[i])}; break;};var%20s=document.createElement('link');s.setAttribute('rel', 'apple-touch-icon');s.setAttribute('href',prompt('Touch icon URL?','http://'));document.getElementsByTagName('head')%5B0%5D.appendChild(s);void(s);
#!/usr/bin/env ruby -w
# delicious2yojimbo.rb by Ben Kerney, ben.kerney@gmail.com
# Based on delicious2yojimbo.pl by Marcus Kazmierczak, marcus@mkaz.com
# and Manton Reece, http://www.manton.org/, which, when I downloaded it on
# 2009-05-16, was not working for me.
# Rather than troubleshoot, I rewrote it in Ruby.
#
# Start a WEBrick server in the cwd (serves html, rhtml, assets)
#
# Usage:
# webrick_on
# webrick_on 8000
#
function webrick_on
{
ruby -e "require 'webrick';include WEBrick;s = HTTPServer.new(:Port => ${@:-9090},:DocumentRoot => Dir::pwd);trap('INT'){s.shutdown};s.start"
# Set up git repository
git :init
# Copy database.yml for distribution use
run "cp config/database.yml config/database.yml.example"
# Set up .gitignore files
run %{find . -type d -empty | xargs -I xxx touch xxx/.gitignore}
file '.gitignore', <<-END
.DS_Store
~$ brew install ffmpeg
Warning: You should upgrade to Xcode 3.1.4
==> Downloading http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
File already downloaded and cached to /Users/bkerney/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/yasm/0.8.0 --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/yasm/0.8.0: 41 files, 2.5M, built in 29 seconds
==> Cloning git://git.videolan.org/x264.git
Repository already cloned to /Users/bkerney/Library/Caches/Homebrew/x264-HEAD
==> Checking out tag 6f5f8c~1
~$ brew install yasm
Warning: You should upgrade to Xcode 3.1.4
==> Downloading http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
File already downloaded and cached to /Users/bkerney/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/yasm/0.8.0 --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/yasm/0.8.0: 41 files, 2.5M, built in 32 seconds
~$ brew install x264
Warning: You should upgrade to Xcode 3.1.4
==> Cloning git://git.videolan.org/x264.git
@bak
bak / quix.txt
Created February 17, 2010 21:10
> Custom Quix Commands adapted from Merlin Mann
> TITLE: quix.txt
> GITHUB: http://gist.github.com/307009
> MORE: http://quixapp.com
> UPDATED: 2010-02-17_13-13-54
@Custom Quix Commands, orig. adapted from Merlin Mann
cal javascript:var%20s;if(window.getSelection){s=window.getSelection();}else{s=document.selection.createRange().text;}var%20t=prompt('Please%20enter%20a%20description%20for%20the%20event',s);if(t){void(window.open(encodeURI('http://www.google.com/calendar/event?ctext='+t+'&action=TEMPLATE&pprop=HowCreated%3AQUICKADD'),'gcal'));}else{void(s);} Add event to Google Calendar
down http://downforeveryoneorjustme.com/%d Is this site downforeveryoneorjustme?
gread javascript:var%20b=document.body;if(b){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)} Subscribe in Google
AMISH FRIENDSHIP BREAD
* Do not refrigerate.
* Air will build up in the bag. Let it out.
* The blob will grow. This is normal.
Day 1 March 31: Do nothing.
Day 2 April 1: Mash the bag.
Day 3 April 2: Mash the bag.
Day 4 April 3: Mash the bag.
#!/usr/bin/osascript
-- This script uses rooSwitch to switch Notational Velocity to the "encrypted" profile.
tell application "rooSwitch"
tell document "Notational Velocity.rooSwitch" to tell profile "encrypted" to make active with allow quit
end tell
tell application "Notational Velocity" to activate
tell application "rooSwitch" to quit