Skip to content

Instantly share code, notes, and snippets.

👀
Currently looking, ideally for a good cause!

David Calhoun davidcalhoun

👀
Currently looking, ideally for a good cause!
Block or report user

Report or block davidcalhoun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davidcalhoun
davidcalhoun / transitionend.html
Created Nov 17, 2010
Example usage of a cross-browser ontransitionend event (CSS transition)
We couldn’t find that file to show.
View gist:904893
<!doctype html> <!-- don't forget your doctype! -->
<html>
<head>
<style>
input { display: block; } /* use this instead of <br/> tags in your HTML */
</style>
</head>
<body>
<form name="test" id="test"> <!-- add id so you can select it with DOM2 selector getElementById -->
<select name="somename">
@davidcalhoun
davidcalhoun / microdata-highlighter.js
Created Jun 4, 2011
Simple Microdata Highlighter Bookmarklet
View microdata-highlighter.js
// Dead simple - works on anything with attribute CSS selectors (IE7+)
// http://en.wikipedia.org/wiki/Microdata_(HTML5)
(function(){
var a = document.createElement('style');
a.innerHTML = '[itemprop] {border: 2px solid red;}';
document.body.appendChild(a);
})();
// Paste this into your address bar
@davidcalhoun
davidcalhoun / htmlentities.js
Created Jun 15, 2011
Shortest HTMLEntities in JavaScript ever
View htmlentities.js
/* From Ben McMahan:
http://www.quora.com/What-are-the-most-interesting-HTML-JS-DOM-CSS-hacks-that-most-web-developers-dont-know-about/answer/Ben-McMahan
Example usage:
HTMLEntities('<div id="foo">bar</div>'); // '&lt;div id="foo"&gt;bar&lt;/div&gt;'
*/
function HTMLEntities(a) {
var b = document.createElement('a');
@davidcalhoun
davidcalhoun / learning_resources.txt
Created Jun 19, 2011 — forked from nathansmith/learning_resources.md
Resources for learning web design & front-end development
View learning_resources.txt
Resources for learning web design & front-end development:
================================================================================
**ONLINE**
Design
> http://52weeksofux.com
> http://thedesigncubicle.com
@davidcalhoun
davidcalhoun / subscribe-bookmarklet.js
Created Jun 23, 2011
Google reader subscribe bookmarklet (opens in new window)
View subscribe-bookmarklet.js
(function(){var k=void 0,n=null,o;var r=this;function s(){}
function t(a){var c=typeof a;if(c=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if(b=="[object Window]")return"object";if(b=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(b=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(c=="function"&&typeof a.call=="undefined")return"object";return c}
var u="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),aa=0;function v(a,c){function b(){}
b.prototype=c.prototype;a.v=c.prototype;a.prototype=new b}
var ba=/^[a-zA-Z0-9\-_.!~*'()]*$/;function ca(a){a=String(a);return!ba.test(a)?encodeURIComponent(a):a}
function da(a,c){for(var b=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").
@davidcalhoun
davidcalhoun / assembly
Created Jun 23, 2011
Old assembly code from class
View assembly
// found this in my Gmail drafts... old assemly code from when I was taking this class in 2008 or so?
.ORIG x3000    ;program start
IN        ;read character from keyboard
ADD R2, R0, #0    ;place the character into R2
IN       
ADD R3, R0, #0    ;define R3
IN
ADD R4, R0, #0    ;define R4
@davidcalhoun
davidcalhoun / japan-jobs.md
Created Jul 31, 2011
Foreigner-friendly software companies in Japan
View japan-jobs.md
@davidcalhoun
davidcalhoun / japanese-guide.md
Created Jul 31, 2011
Quick Japanese Language Guide
View japanese-guide.md

Quick Japanese Language Guide

Quick rules

  • Vowels sound similar to Spanish: a = ah, e = eh, i = ee, o = oh, u = ooh.
  • Doubled letters mean long vowels. For instance, ooki is the same as ōki (ohhh-ki).
  • There are multiple ways to say things. Generally, the longer the sentence, the more polite. For an example, see "Thank you" below in Basic Conversation.
  • Some endings are barely audible, so it's best to just omit them if you try to say something. These silent endings are in parenthesis. For instance, "DES(U)" sounds like "DES". It will only sound like "DESU" when someone is being very polite.
  • Don't look at the whole word when pronouncing, just pronounce syllable by syllable. For instance, "hajimemashite" ("nice to meet you") may look hard to pronounce, but you just sound it out, splitting it up: "ha-ji-me-ma-shi-te".
View html5-mobile-web-book.md

Book outline

Overview

  • what this book is not: focus on supporting older phones, WAP and older standards
  • Focus on the future: the shift towards HTML5. making the case, showing the data, etc

Thinking differently

  • big differences on mobile: screen orientation, screen sizes, geolocation, accelerometer, usage, battery, hover states are awkward, etc.

Mobile First? More common: Mobile Last

You can’t perform that action at this time.