Skip to content

Instantly share code, notes, and snippets.

View mikedamage's full-sized avatar

Mike Green mikedamage

View GitHub Profile
@mikedamage
mikedamage / gist:1319631
Created October 27, 2011 14:05
Mike's Jade Pipe Code
output = ""
IO.popen(processor, 'r+') do |pipe|
pipe.puts tmpl
pipe.close_write
while l = pipe.gets
output << l
end
end
@mikedamage
mikedamage / gist:1319612
Created October 27, 2011 13:59
Mike's RegExp
/\<!--\ ?\@(\w+)\ (.+)\ ?--\>/
@mikedamage
mikedamage / gist:1319608
Created October 27, 2011 13:57
James's RegExp
/<!-- @(jade) (.*) -->/
@mikedamage
mikedamage / challenge.html
Created October 26, 2011 16:58
HTML file for FRC Coding Challenge #1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test File</title>
</head>
<body>
<!-- @jade agenda -->
<!-- @haml calendar -->
</body>

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

@mikedamage
mikedamage / robots.txt
Created September 28, 2011 23:02
Boilerplate WordPress robots.txt
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
Disallow: /feed
Disallow: /comments
@mikedamage
mikedamage / gist:1229877
Created September 20, 2011 18:25
wordpress migration checklist

WordPress Migration Notes

When moving a WordPress database from one server to another, the 'guid' attribute of everything in the wp_posts table needs to be modified to include the new server's URL.

(Values in angle brackets are placeholders - everything else is literal)

Example Query:

UPDATE wp_posts SET guid = REPLACE(guid, '<old_url>', '<new_url>');
@mikedamage
mikedamage / instructions.md
Created July 8, 2011 21:38
Modifying AppleUSB kernel extension

Editing the AppleUSB Trackpad Kernel Extension

  1. make a time machine backup first
  2. look for the kext file in /System/Library/Extensions
  3. make a copy of it somewhere
  4. then go into Terminal (you can't edit the file from Finder, it'll give you a permissions error)
  5. in terminal, type cd /System/Library/Extensions/WHATEVER_THE_KEXT_IS_CALLED.kext/Contents
  6. type sudo nano Info.plist
  7. it'll ask you for your password, type it and hit enter
  8. from there it's a matter of editing the XML file like he says
@mikedamage
mikedamage / gist:1012540
Created June 7, 2011 15:54
PHP QA Standards for MindClings Project
<?php
/**
* MindClings Coding Standards
* Fifth Room Creative
*/
?>
1. Use string interpolation. Don't glue strings together unless it's really necessary.
Interpolation is only a little slower, and it's much more readable.
@mikedamage
mikedamage / hcard-info.md
Created May 31, 2011 02:02
hcard shortcode examples

HCard Shortcode Example

Simplest example is just [hcard].

This builds a div using the HCard Microformat spec, which enlightened browsers and devices can take advantage of. With no other options, [hcard] fills in the following default contact info: