Skip to content

Instantly share code, notes, and snippets.

@cesine
cesine / particles.html
Created January 9, 2012 22:08 — forked from jmhobbs/particles.html
Simple JavaScript Particles
<html>
<head>
</head>
<body>
<canvas id="base" width="500" height="500" style="border: 1px solid #444; background: #000;"></canvas>
<script>
var elem = document.getElementById( 'base' );
var context = elem.getContext( '2d' );
var Sprite = function () {
@cesine
cesine / couchdb-ec2-install.sh
Created July 3, 2012 05:31 — forked from msmith/couchdb-ec2-install.sh
Set up CouchDB on EC2
#!/bin/bash
#
# For http://stackoverflow.com/questions/6162891/installing-couchdb-in-aws-ec2-free-tier
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
# It is a modified fork of the original rake script, but does not use rake (just good ol' linux tools)
# Based on: http://wiki.apache.org/couchdb/Installing_on_RHEL5
@cesine
cesine / shims.js
Created September 25, 2012 00:47
Require.js shims
require.config({
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ["underscore", "jquery"]
, exports: "Backbone"
}
}
@cesine
cesine / buildforhackability.js
Created September 25, 2012 00:56
Build with require js so that the code is readable, mutable and general hackability for our power users "Javascript console"
({
baseUrl : "./public",
dir : "./release",
optimize : 'none',
inlineText: true,
namespace: 'fielddb',
skipModuleInsertion: false,
mainConfigFile : "public/main_dashboard.js",
modules : [ {
name : "main_dashboard"
({
baseUrl : "./public",
dir : "./release",
optimize : 'uglify',
uglify: {
toplevel: true,
ascii_only: true,
beautify: true,
max_line_length: 1000
},
({
baseUrl : "./public",
dir : "../assets/release",
optimize : 'uglify',
uglify: {
toplevel: true,
ascii_only: true,
beautify: true,
max_line_length: 1000
},
({
baseUrl : "./public",
dir : "./release",
optimize : 'uglify',
uglify: {
toplevel: true,
ascii_only: true,
beautify: true,
max_line_length: 1000
},
({
baseUrl : "./public",
dir : "./activitywidget",
optimize : 'uglify',
uglify: {
toplevel: true,
ascii_only: true,
beautify: true,
max_line_length: 1000
},
var Corpus = Backbone.Model.extend({
changePouch : function(couchConnection, callback) {
this.pouch = Backbone.sync.pouch(couchConnection.pouchname);
callback();
},
saveAndInterConnectInApp : function(callback) {
callback();
}
});
@cesine
cesine / corpus_dashboard.js
Created September 27, 2012 02:01
This is what our require really looks like...
// Set the RequireJS configuration
require.config({
paths : {
/* Bootstrap user interface javascript files */
"bootstrap" : "bootstrap/js/bootstrap",
"bootstrap-transition" : "bootstrap/js/bootstrap-transition",
"bootstrap-alert" : "bootstrap/js/bootstrap-alert",
"bootstrap-modal" : "bootstrap/js/bootstrap-modal",
"bootstrap-dropdown" : "bootstrap/js/bootstrap-dropdown",
"bootstrap-scrollspy" : "bootstrap/js/bootstrap-scrollspy",