Skip to content

Instantly share code, notes, and snippets.

View ggoodman's full-sized avatar

Geoff Goodman ggoodman

View GitHub Profile
@wadey
wadey / index.html
Created December 3, 2010 22:06
SimpleGeo Advanced getLocation Example
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="http://cdn.simplegeo.com/js/1.2/simplegeo.context.jq.min.js"></script>
<script type="text/javascript" src="http://github.com/simplegeo/polymaps/raw/v2.4.0/polymaps.js"></script>
</head>
<body>
<script type="text/javascript">
@keturn
keturn / README.markdown
Created May 25, 2011 22:51
playing with canvas and sierpinski

Canvas Experiment: Sierpinski Triangles

This is just a little doodle for me to get a feel for how the HTML5 canvas element can be used. The canvas is a pixel-based sort of thing, and so maybe not well suited to applications that want scalable elements or independent moving parts; there SVG might be a better choice. But for uses where you want to fiddle with a lot of pixels, where it'd be undesirable to make a new object for every point you manipulate, canvas fits the bill.

@iros
iros / index.html
Created September 6, 2011 19:35 — forked from boazsender/index.html
<!DOCTYPE html>
<html>
<head>
<title>Twitter Search Plugin</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="jquery.twitter.js"></script>
<style type="text/css">
.twitter-posts li {margin-bottom: 10px; font-size: 12px; clear: both; list-style-type:none;}
.twitter-posts li img {float:left; width: 48px; margin:0px 10px 10px 0px;border:1px solid #c2c2c2; -moz-box-shadow: 0px 0px 4px #c2c2c2; -webkit-box-shadow: 0px 0px 4px #c2c2c2; box-shadow: 0px 0px 4px #c2c2c2;}
.twitter-posts li a {text-decoration:none; color: #009;}
@ggoodman
ggoodman / README.md
Created September 6, 2011 20:56
Slamikaze html5 game proof of concept

SLAMIKAZE

With your guns disabled and no other means of fighting back, your hopes of survival are all but lost. The enemy are savage, suicidal beasts who will follow you blindly to the furthest reaches of the universe.

Only one hope remains; if you are quick and clever, there might just be a chance... good luck.

How to play

  • Your ship (blue square) follows your mouse cursor closely
  • Enemy ships (red squares) follow your mouse cursor as fast as their weaker ships allow
  • Avoid enemy ships while causing them to collide in order to flee to safety
@johan
johan / readme.md
Last active October 17, 2022 23:14 — forked from johan/autofork.js
(Re)fork any gist, including your own

Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓

<!DOCTYPE html>
<html>
<head>
<title>Wax.G Layer Switcher</title>
<script src='http://maps.google.com/maps/api/js?sensor=false' type='text/javascript'></script>
<script src='http://www.geosprocket.com/mapbox-wax/dist/wax.g.js' type='text/javascript'></script>
<script src='http://code.jquery.com/jquery-1.6.4.min.js' type='text/javascript'></script>
<link href='http://www.geosprocket.com/mapbox-wax/theme/controls.css' rel='stylesheet' type='text/css' />

Lumbar.View

TRY ME OUT AT: http://bl.ocks.org/1483563

As is evident from the name chosen for this library - lumbar - this has been heavily influenced by the incredible Backbone.js. In fact, the full lumbar framework is designed to sit on top of Backbone.js for the time being. This is because the model, collection and router components of Backbone.js are 10x better than anything I can write.

I wrote this because I'm not a major fan of the way Backbone.js' View system works. This system is very similar, but has a few key differences. Please refer to the last section below.

Caveats

@thurloat
thurloat / formview.coffee
Created January 18, 2012 02:59
Backbone Form -> Model sync View
# FormView Class
#
# Backbone View subclass that will allow you to bind input fields
# to model fields and keep the data in sync using the same
# declarative syntax you're used to for Backbone Views.
#
# blog post: http://thurloat.com/2012/01/17/backbone-sync-models-and-views
#
# class TestView extends FormView
#
@janjongboom
janjongboom / gist:3295842
Created August 8, 2012 15:18
Deployment command line tools in Cloud9

Herro! The latest updated official docs are on the Cloud9 support website

Here you'll find details on installing deployment tools from third party vendors to be used in Cloud9 IDE. Besides using terminal tools, there is also a GUI available for Heroku and Azure Sites on all plans. Of course git based deploys will also work without command line tooling.

All commands need to be executed in the terminal (ALT+T) unless stated otherwise.

If you have additions, please note them in the comments and I'll add them to this gist

Heroku

@abourget
abourget / directives.js
Created August 8, 2012 20:24
Hammer.js integration with AngularJS
/**
* Inspired by AngularJS' implementation of "click dblclick mousedown..."
*
* This ties in the Hammer events to attributes like:
*
* hm-tap="add_something()"
* hm-swipe="remove_something()"
*
* and also has support for Hammer options with:
*