Skip to content

Instantly share code, notes, and snippets.

View mlynch's full-sized avatar
🍂
Building something new

Max Lynch mlynch

🍂
Building something new
View GitHub Profile
enablePushState = true
pushState = !!(enablePushState && window.history && window.history.pushState)
if pushState
Backbone.history.start
pushState: true
root: '/'
else
Backbone.history.start
showPanel: (panel, subPanel) =>
# Default the panel to 'projects' if it's empty
panel = panel or 'projects'
# Show the panel, toggle buttons, etc.
# ...
class DashboardView extends Backbone.View
initialize: ->
@router = new DashboardRouter
@router.on 'route:showPanel', @showPanel
class DashboardRouter extends Backbone.Router
routes:
'': 'showPanel'
'dash/:panel': 'showPanel'
'dash/:panel/:subpanel': 'showPanel'
.embed {
#code {
.top {
position: relative;
height: 10px;
margin-top: 20px;
background-color: #eee;
border-top: 1px solid #ccc;
@include gradient-vertical(#eee, #ddd);
for child in component.children
// do stuff
for(var i = 0; i < component.children.length; i++) {
var child = component.children[i];
//
}
localDrive.rm
root: '/'
flags: 'rf'
localDrive.rm({
root: '/',
flags: 'rf'
});
@mlynch
mlynch / manifest.json
Created July 20, 2012 20:02
Codiqa Project Manifest
{
"name": "Codiqa Prototypes",
"description": "Rapid Mobile Prototyping - Saves directly to Google Drive!",
"version": "1.3",
"container": "GOOGLE_DRIVE",
"api_console_project_id" : "CONSOLE_PROJECT_ID",
"intents": {
"http://drive.google.com/intents/opendrivedoc": [ {
"disposition": "window",
"href": "http://codiqadrive.appspot.com",