This article is now published on my website: A one-off git repo server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script watches for changes in a document and constantly resaves a file | |
# with the document's contents. | |
# | |
# Usage: coffee saver.coffee -d <DOCNAME> [--url http://somehost:8000/sjs] [-f filename] | |
client = require('share').client | |
fs = require('fs') | |
argv = require('optimist') | |
.usage('Usage: $0 -d docname [--url URL] [-f filename]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assumes you are using <html> conditional classes as described here: | |
// http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ | |
.lt-ie7 { | |
// blockquote small:before{content:'\2014 \00A0';} | |
blockquote small:before{content:"";} | |
// [class*="span"]{display:inline;float:left;margin-left:20px;} | |
.span1{display:inline;float:left;margin-left:20px;} | |
.span2{display:inline;float:left;margin-left:20px;} | |
.span3{display:inline;float:left;margin-left:20px;} | |
.span4{display:inline;float:left;margin-left:20px;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For those folks not already hanging out in #documentcloud... here's the log of this afternoon's Ember/Backbone politics discussion. | |
12:21 PM <wycats> jashkenas: hey | |
12:21 PM <wycats> jashkenas: I'm sorry | |
12:21 PM <wycats> how would you like me to describe backbone? | |
12:21 PM <wycats> let's work this out for once and for all :) | |
12:21 PM <wycats> I'm definitely not intentionally saying incorrect things about backbone | |
12:22 PM • knowtheory gets out popcorn | |
12:24 PM <jashkenas> don't worry about it too much -- I'm just not terribly pleased with backbone being continued to be used as the strawman... | |
12:24 PM <wycats> jashkenas: I am worried about it a lot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Algorithm W (Damas-Hindley-Milner) in LiveScript. | |
# By Paul Miller (paulmillr.com), Public domain. | |
# | |
# Based on Robert Smallshire's [Python code](http://bit.ly/bbVmmX). | |
# Which is based on Andrew's [Scala code](http://bit.ly/aztXwD). | |
# Which is based on Nikita Borisov's [Perl code](http://bit.ly/myq3uA). | |
# Which is based on Luca Cardelli's [Modula-2 code](http://bit.ly/Hjpvb). | |
# Something like that. | |
prelude = require './prelude' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################### | |
# BUILD HOME script: | |
# This script sets up your home directory fast with basic | |
# necessities and amenities, to give you sanity when you | |
# work on a Unix box where you don't have root access. | |
############################################################### | |
### TO USE: | |
# wget https://gist.github.com/raw/3639058/build_home.sh | |
# bash build_home.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This casper scipt checks for 404 internal links for a given root url. | |
* | |
* Usage: | |
* | |
* $ casperjs 404checker.js http://mysite.tld/ | |
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
*/ | |
/*global URI*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'serverspec' | |
require 'pathname' | |
require 'net/ssh' | |
include Serverspec::Helper::Ssh | |
include Serverspec::Helper::DetectOS | |
RSpec.configure do |c| | |
if ENV['ASK_SUDO_PASSWORD'] | |
require 'highline/import' |