Skip to content

Instantly share code, notes, and snippets.

View mko's full-sized avatar
🥃
Design. Code. Whiskey.

Michael Owens mko

🥃
Design. Code. Whiskey.
View GitHub Profile
@mko
mko / h-as-note.html
Created July 15, 2014 19:02
h-entry as photo vs h-entry as note with photo
<article class="h-entry">
<figure class="e-content p-name">
<img src="/path/to/image" alt="Description of Image" class="u-photo">
<figcaption class="p-summary">Description of Image</figcaption>
</figure>
<p>Published by <a class="p-author h-card" href="https://domain.ext">Photographer</a>
on <time class="dt-published" datetime="2014-07-14 12:00:00">July 14<sup>th</sup>, 2014</time></p>
</article>
@mko
mko / gist:3861881
Created October 9, 2012 22:33 — forked from jazzychad/gist:3861848
git post-receive hook to tar the repo and send to s3 for backup
#!/bin/bash
# a post-receive hook for git servers to tar the current repo and send to s3 for backup
# save as 'post-receive' and put it in .git/hooks of desired repo(s), chmod +x
# assumes you have the s3cmd program installed and configured (sudo apt-get install s3cmd)
echo "thanks for the push. have a nice day."
# configure your S3BUCKET name, the rest should be automatic
@mko
mko / CivilDisobedience.md
Created February 3, 2017 23:02
Civil Disobedience, by Henry David Thoreau, 1849 (original source: http://xroads.virginia.edu/~hyper2/thoreau/civil.html)

Civil Disobedience

By Henry David Thoreau

1849

I heartily accept the motto, "That government is best which governs least"; and I should like to see it acted up to more rapidly and systematically. Carried out, it finally amounts to this, which also I believe- "That government is best which governs not at all"; and when men are prepared for it, that will be the kind of government which they will have. Government is at best but an expedient; but most governments are usually, and all governments are sometimes, inexpedient. The objections which have been brought against a standing army, and they are many and weighty, and deserve to prevail, may also at last be brought against a standing government. The standing army is only an arm of the standing government. The government itself, which is only the mode which the people have chosen to execute their will, is equally liable to be abused and perverted before the people can act through it. Witness the present Mexican war, the work of comparatively a few indi

@mko
mko / gist:5035561
Created February 26, 2013 03:12
Terminal Command for opening Adobe Photoshop CS6 on a standard CS6 installation
/Applications/Adobe\ Photoshop\ CS6/Adobe\ Photoshop\ CS6.app/Contents/MacOS/Adobe\ Photoshop\ CS6
@mko
mko / gist:4758911
Last active December 12, 2015 10:28
var geojson = {
"type": "Feature",
"properties": {
"ZCTA5CE10": "94117",
"GEOID10": "94117",
"CLASSFP10": "B5",
"MTFCC10": "G6350",
"FUNCSTAT10": "S",
"ALAND10": 4370658.0,
"AWATER10": 1625.0,
data:text/html;charset=utf-8, <html contenteditable><script>var t=prompt("What do you want to call this file?","TextEditor");document.title=t;</script> <link rel="shortcut icon" href="http://g.etfv.co/https://docs.google.com"/> <style> html{height: 100%;} body{background: -webkit-linear-gradient(#f0f0f0, #fff); padding: 3%; height: 94%;} .paper { font: normal 12px/1.5 "Lucida Grande", arial, sans-serif; width: 50%; height: 80%; margin: 0 auto; padding: 6px 5px 4px 42px; position: relative; color: #444; line-height: 20px; border: 1px solid #d2d2d2; background: #fff; background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px; background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; -webkit-background-size: 100% 20p
9/27/12 7:33:29.514 PM Prototypes[7709]: error image 2: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x111b28740 {NSUnderlyingError=0x115eb47f0 "The request timed out.", NSErrorFailingURLStringKey=https://prototypesapp.com/prototype-api/v1/image/0B6E79FC-CC19-4071-8D93-E5BDAD310BDB/7D17F5BA-B947-4CE4-BAB7-AA6559FC7B00, NSErrorFailingURLKey=https://prototypesapp.com/prototype-api/v1/image/0B6E79FC-CC19-4071-8D93-E5BDAD310BDB/7D17F5BA-B947-4CE4-BAB7-AA6559FC7B00, NSLocalizedDescription=The request timed out.}
9/27/12 7:42:48.442 PM Prototypes[7709]: error image 2: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x10c9c56a0 {NSUnderlyingError=0x1267eacd0 "The request timed out.", NSErrorFailingURLStringKey=https://prototypesapp.com/prototype-api/v1/image/0B6E79FC-CC19-4071-8D93-E5BDAD310BDB/15941B37-8068-4A72-85A3-6091CF368346, NSErrorFailingURLKey=https://prototypesapp.com/prototype-api/v1/image/0B6E79FC-CC19-4071-8D93-E5BDAD310BDB/15941B37-8068-4A72-85A3
@mko
mko / Node.js + Sphero
Created August 21, 2012 23:47
Example of Node-like callback behavior with Sphero SDK
bot.setRGB(req.param('red'), req.param('green'), req.param('blue'), function(err, data) {
if(err) {
reply.error = new Error(err.message);
} else {
reply = data;
}
});
res.send(reply);
return;
@mko
mko / oath.txt
Created March 4, 2015 20:54
Hippocratic Oath
I swear by Apollo the physician, and Aesculapius the surgeon, likewise Hygeia and Panacea, and call all the gods and goddesses to witness, that I will observe and keep this underwritten oath, to the utmost of my power and judgment.
I will reverence my master who taught me the art. Equally with my parents, will I allow him things necessary for his support, and will consider his sons as brothers. I will teach them my art without reward or agreement; and I will impart all my acquirement, instructions, and whatever I know, to my master's children, as to my own; and likewise to all my pupils, who shall bind and tie themselves by a professional oath, but to none else.
With regard to healing the sick, I will devise and order for them the best diet, according to my judgment and means; and I will take care that they suffer no hurt or damage.
Nor shall any man's entreaty prevail upon me to administer poison to anyone; neither will I counsel any man to do so. Moreover, I will give no sort of medicine to any pregnant
@mko
mko / result_actual.json
Last active August 29, 2015 14:10
microformats2 person-tagging use case (as parsed by `php-mf2` as of 11/24/2014)
{
"items": [
{
"type": ["h-entry"],
"properties": {
"category": [
{
"type": ["h-card"],
"properties": {
"name": ["Person Bee"],