View getscript.js
1 2 3 4 5 6 7 8 9 10
// # getScript()
// more or less stolen from jquery core and adapted by paul irish
 
function getScript(url,success) {
var head = document.getElementsByTagName("head")[0], done = false;
var script = document.createElement("script");
script.src = url;
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") ) {
View swap.md
Sending Request…
  1. If /extraswap was previously created then run:
sudo swapoff /extraswap && sudo rm /extraswap    
  1. Type:
dd if=/dev/zero of=/extraswap bs=1M count=1024
View export.php
1 2 3 4 5 6 7 8 9 10
<?php
/*
Place this file inside a folder called /export/ and run it from there as http://yoursite/export/export.php
*/
include "../wp/wp-load.php";
include "../wp/wp-admin/includes/file.php";
define('DB_NAME', 'DNNAME');
View curl.md
Sending Request…

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
View sparklines.js
1 2 3 4 5 6 7 8 9 10
var data, ticks;
 
ticks = ['', '', '', '', '', '', '', ''];
 
exports.clark = function(data) {
var m, n, t;
m = Math.min.apply(Math, data);
n = (Math.max.apply(Math, data) - m) / (ticks.length - 1);
return ((function() {
var i, len, results;
View practice
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
 
class Practice
def initialize
@data = {}
try_to_load_data
end
 
def record_today(minutes)
@data[key_for(Time.now)] = minutes
View header.html
1 2 3 4 5 6 7 8 9
<!--
88888888o. .
888 888 .o8 .ooooooo. oooo oooo oooo
888 888 888888o. .o888oo 888880. ooo. .oo. .oo. .o88888o. 888 `888 `888 888'
888 888 888 888 888 `888P"Y88bP"Y88b 888 888oooo 888 `888888'
888 888 .o8888888 888 .o8888888 888 888 888 888 888 888 `888'
888 888 888 888 888 . 888 888 888 888 888 888 888 888 88' .o.
888888888' `Y8bod8P' "888" `Y8bod8P' o888o o888o o888o `Y8bod8P' o888o o888o 88' Y8P
View Inflector.php
1 2 3 4 5 6 7 8 9 10
<?php
/**
* Inflector for pluralize and singularize English nouns.
*
* This Inflector is a port of Ruby on Rails Inflector.
*
* It can be really helpful for developers that want to
* create frameworks based on naming conventions rather than
* configurations.
*
View README.md

Deploying Sculpin Sites to GitHub Pages

I wanted to be able to use Sculpin to generate GitHub pages. Here's what I did...

  1. Created a super awesome Sculpin site from the Sculpin Blog Skeleton
  2. Make sure everything is under version control in my master branch (except things that shouldn't be. see the .gitignore)
  3. Updated publish.sh:

    #!/bin/bash
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Something went wrong with that request. Please try again.