[ Launch: Tributary inlet ] 5498205 by rohn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require) { | |
"use strict"; | |
var Backbone = require("backbone"); | |
var model = Backbone.Model.extend({ | |
initialize: { | |
// initialization | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function (require) { | |
"use strict"; | |
var Backbone = require('backbone'); | |
var model = require("model.js"); | |
var collection = Backbone.Collection.extend({ | |
model: model, | |
url: "/models.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
// an object that we will extend later | |
var foo = { | |
baz: function() { | |
// some interesting behaviour | |
} | |
}; | |
foo.baz.prototype.fubar = function() { |
I hereby claim:
- I am rohn on github.
- I am rohn (https://keybase.io/rohn) on keybase.
- I have a public key whose fingerprint is 7DF4 2529 A2DA A4B8 8FD0 EF72 A791 5551 906D 1BEE
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Load Grunt tasks declared in the package.json file | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
// Configure Grunt | |
grunt.initConfig({ | |
// grunt-contrib-connect will serve the files of the project | |
// on specified port and hostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
// | |
// Load Tasks | |
// | |
require('load-grunt-tasks')(grunt, [ | |
'grunt-*', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
"use strict"; | |
// Config... | |
grunt.initConfig({ | |
watch: { | |
options: { | |
livereload: true | |
}, | |
html: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var concat = require('gulp-concat'); | |
var connect = require('gulp-connect'); | |
var header = require('gulp-header'); | |
var jpegoptim = require('imagemin-jpegoptim'); | |
var jshint = require('gulp-jshint'); | |
var livereload = require('gulp-livereload'); | |
var optipng = require('imagemin-optipng'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const state = {a:1, b:2, c:3, d:{aa:11, bb:22}} | |
console.log(state) // { a: 1, b: 2, c: 3, d: { aa: 11, bb: 22 } } | |
const b = 55 | |
const aa = 444 | |
const total = {...state, b, d: {...state.d, aa}} | |
console.log(total) // { a: 1, b: 55, c: 3, d: { aa: 444, bb: 22 } } |
OlderNewer