Skip to content

Instantly share code, notes, and snippets.

View yornaath's full-sized avatar
🔥
buidling

Yornaath yornaath

🔥
buidling
View GitHub Profile
@yornaath
yornaath / gist:d9d2a32d0d78bed2ff2c
Last active August 29, 2015 14:20
configbuilder.js
/**
* Import
*/
import Promise from 'bluebird';
import afs from '../lib/asyncfs';
import path from 'path';
import extend from 'extend';
TableRowView backbone.View.extend({})
TableView = backbone.View.extend({
TableRowViewClass: TableRowView,
render: function() {
this.collection.forEach(function(model) {
@yornaath
yornaath / gist:6163057
Created August 6, 2013 09:25
method on Backbone.Model, why doesnt it fire a change event?
addContactId: function( contactId ) {
var contactIds
contactIds = this.get( 'contactIds' )
if( _.indexOf(contactIds, contactId) == -1 ) {
contactIds.push( contactId )
this.set( 'contactIds', contactIds.slice() )
}
}
<field name="antall"> 1
<field name="???"> Melding
<field name="antall"> 2 (eller alle antall større en 1)
<field name="???"> Meldinger
var defaultChartOptions = {
xax: {
degrees: 45,
type: "default"
},
styles: {
colors: {
top: "red",
bottom: "blue"
ApplicationManager.prototype.importDB = function( callback ) {
async.auto({
flushDB: bind( this.flushDB, this ),
readSQLFromSnapshot: bind( fs.readFile, fs, this.currentApplicationSnapshot.getDBExportPath(), 'utf8' ),
insertSql: ['flushDB', 'readSQLFromSnapshot', bind(this.insertSql, this)]
},
callback)
}
@yornaath
yornaath / cluster.review.js
Created September 15, 2012 22:01
cluster
/**
* Module dependencies.
*/
var express = require('express'),
http = require('http'),
path = require('path'),
api = require('./apps/api'),
client = require('./apps/client'),
@yornaath
yornaath / gist:3728420
Created September 15, 2012 15:14
nodejitsu deploy snapshot not found
lolser:appserver gorillatron$ jitsu deploy
Password:
info: Welcome to Nodejitsu gorillatron
info: jitsu v0.9.8
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node app
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/gorillatron/progg/Mayo/appserver/package.json
@yornaath
yornaath / dabblet.css
Created June 18, 2012 21:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@yornaath
yornaath / gist:2881720
Created June 6, 2012 13:04 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt