Skip to content

Instantly share code, notes, and snippets.

View getify's full-sized avatar
💭
Just coding

Kyle Simpson getify

💭
Just coding
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>WebSocket test</title>
</head>
<body>
<script src="http://localhost:8080/socket.io/socket.io.js"></script>
<script>
var server = 'smtp.example.com',
port = 587,
@nathansmith
nathansmith / file_input_example.css
Created December 9, 2011 14:56
Markup to Hide a File Input
.fake_file_input {
background: url(../images/fake_file_input.png) no-repeat;
cursor: pointer;
width: 150px;
height: 30px;
overflow: hidden;
position: relative;
display: inline-block;
*display: inline;
*zoom: 1;
@mondaychen
mondaychen / gist:1598350
Created January 12, 2012 03:17 — forked from getify/gist:670840
using LABjs to load from a CDN, with simple error detection (& timeout), and a local load fallback
function loadOrFallback(scripts,idx) {
var successfully_loaded = false;
function testAndFallback() {
clearTimeout(fallback_timeout);
if (successfully_loaded) return; // already loaded successfully, so just bail
try {
scripts.tester();
successfully_loaded = true; // won't execute if the previous "test" fails
scripts.success();
// console.log("success: " + scripts.src[idx]);
@polotek
polotek / .gitignore
Last active October 5, 2015 13:57
A little wrapper around localStorage that supports compound keys and non-string values
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
@davidcalhoun
davidcalhoun / app-icons.md
Created July 13, 2012 01:03
Application icons (OSX)

================== Step 1: Find a browser icon

/Applications/Safari.app/Contents/Resources/compass.icns

/Applications/Firefox.app/Contents/Resources/firefox.icns

/Applications/FirefoxNightly.app/Contents/Resources/firefox.icns

/Applications/Google Chrome.app/Contents/Resources/app.icns

@fjakobs
fjakobs / ssl_terminate.js
Created July 16, 2012 19:00
SSL termination proxy
var tls = require("tls");
var net = require("net");
var fs = require("fs");
var host = "c9.dev";
tls.createServer({
key: fs.readFileSync(__dirname + "/key.pem"),
cert: fs.readFileSync(__dirname + "/cert.pem")
}, function(client) {
@fivetanley
fivetanley / es-discuss-july2012.md
Created July 28, 2012 17:52
ES-Discuss July 2012 Summary

ES-Discuss Summary July 2012

Take any dicussion to the ES-discuss mailing list!

Edit: This is a draft! If anybody's interested I'll continue working on this (Leave a +1 in the comments). Please use the comments ONLY for spelling/grammar/factual wrongness. Any discussion should go to ES-discuss.

[ES Discuss Archives][archives] | [Download July 2012 Archives][july-archive]

Table of Contents

@getify
getify / 3.html
Created September 12, 2012 14:19
how "grips" templating handles it, in response to https://gist.github.com/3696453
{$: '#settings' }
<h1>Settings</h1>
{$* $.settings | name = _.key | options['low','high'] = _.value ? "checked" }
<h2>{$= name $}</h2>
{$* options }
<input type="radio" name="{$= name $}" value="{$= _.key $}" {$= _.value $}> {$= _.key $}
{$}
{$}
{$}
@getify
getify / README.md
Last active December 12, 2015 12:39
HTML5 Road Show - Workshop Series - Austin

Overview

Interested in a boatload of Advanced HTML5 and JavaScript training? We've got just what you need! A full week jam-packed with 1-day workshops on all the HTML5 and JavaScript awesomeness you can handle. Ready to drink from the firehose? Pick one or more of these great workshops during the week of April 8-12, 2013.

Details and Registration: http://thirstyhead.eventbrite.com

Many people ask me, "What can I do to take my HTML5 or JavaScript skills to the next level? There is only so much that you can learn in 60 minutes."

That's why we're excited to offer what we're affectionately calling "Cask-Strength HTML5 Training." Taught by Scott Davis (author of "Google Maps: Adding Where to Your Application"), David Geary (author of "Core HTML5 Canvas"), and Austin native Kyle Simpson (aka, "getify", and author of "HTML5 Cookbook"), these 1-day workshops are an opportunity for you to bring your laptop and your enthusiasm for in-depth training sessions.

@getify
getify / README.md
Last active December 13, 2015 17:28
Answering a good question about feature tests and performance

Today, I had a brief conversation on Twitter with Pamela Fox (from Coursera). My comments were sparked by this tweet and its linked blog post:

Wrote up a blog post on how we warn Coursera users when they are on un-supported browsers via a top banner: http://blog.pamelafox.org/2013/02/warning-users-on-older-browsers.html

I mentioned to her my recent talk "Browser Versions Are Dead" (which btw I hope will have video up soon!), where I advocate abandoning an obsession with browser versions (and vendors!) and embracing, among other things, feature testing.

She responded, in part, with:

There'd be too many things to check for (and stuff that can't be sniffed easily, like performance) and the tests would take time.