Skip to content

Instantly share code, notes, and snippets.

View amundo's full-sized avatar
🛒
(0)

Patrick Hall amundo

🛒
(0)
  • Massachusetts
  • 22:45 (UTC -12:00)
View GitHub Profile
/*
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !!
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@amundo
amundo / backbone-tutorial.js
Created December 18, 2011 19:31 — forked from jacob414/backbone-tutorial.js
Minimal example of data handling in Backbone.js
/* Scaled-down Backbone.js demonstration
* By Jacob Oscarson (http://twitter.com/jacob414), 2010
* MIT Licenced, see http://www.opensource.org/licenses/mit-license.php */
$(function() {
window.ulog = function(msg) { $('#log').append($('<div>'+msg+'</div>')); }
// Faking a little bit of Backbone.sync functionallity
Backbone.sync = function(method, model, succeeded) {
ulog('<strong>'+method + ":</strong> " + model.get('label'));
if(typeof model.cid != 'undefined') {
@amundo
amundo / index.html
Created April 2, 2012 06:03 — forked from bunkat/index.html
Swimlane Chart using d3.js
<html>
<head>
<title>Swimlane using d3.js</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="randomData.js"></script>
<style>
.chart {
// shape-rendering: crispEdges;
}
@amundo
amundo / index.html
Created December 18, 2012 06:21 — forked from mbostock/.block
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>OMG Particles!</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<style type="text/css">
body {
background: #222;
@amundo
amundo / base.py
Created April 14, 2013 17:47 — forked from sweemeng/base.py
from bottle import Bottle
from sqlalchemy import create_engine
from sqlalchemy import MetaData
from sqlalchemy import Table
# Main Web App
app = Bottle()
# Configuration for sqlalchemy
# source https://scraperwiki.com/scrapers/malaysian_mp_profile/
function readFile(file) {
var reader = new FileReader();
var deferred = $.Deferred();
reader.onload = function(event) {
deferred.resolve(event.target.result);
};
reader.onerror = function() {
deferred.reject(this);
@amundo
amundo / index.html
Last active August 29, 2015 14:00 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
rect {
stroke: #fff;
}
</style>
<body>
@amundo
amundo / .gitignore
Last active August 29, 2015 14:01 — forked from mbostock/.block
Oaxaca map
build
node_modules
.DS_Store
@amundo
amundo / cranium.js
Last active August 29, 2015 14:16 — forked from addyosmani/cranium.js
/* Cranium MVC
* A minimalist MVC implementation written for
* demonstration purposes at my workshops
* http://addyosmani.com
* Copyright (c) 2012 Addy Osmani; Licensed MIT */
var Cranium = Cranium || {};
// Set DOM selection utility
@amundo
amundo / index.html
Created August 16, 2016 00:43 — forked from davo/index.html
Export CartoDB GeoJSON to TopoJSON.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->