This file contains hidden or 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 models = require('./models'); | |
models.synchronize(); |
This file contains hidden or 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 buster = require('buster') | |
buster.spec.expose() | |
describe('Outer', function() { | |
beforeAll(function() { | |
this.foo = 1 | |
console.log('outer beforeAll', this.foo) | |
}) |
This file contains hidden or 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 User = sequelize.import(__dirname + '/../models/User.js'); | |
var Phone = sequelize.import(__dirname + '/../models/Phone.js'); | |
Phone.hasOne(User,{ foreignKey: 'Phone_id'}); | |
Phone.findAll().success(function(phones){ | |
phones.forEach(function(phone) { | |
phone.getUser().success(function(user){ | |
console.log(phone.Name, user.Extension); | |
}); |
This file contains hidden or 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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName busterrrrr.com | |
ServerAdmin [email protected] | |
ProxyRequests On | |
ProxyPreserveHost On | |
ProxyStatus On | |
<Location /> |
This file contains hidden or 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
sdepold:~/Projects/buster-dev ∴ ls -ila | |
total 0 | |
26250376 drwxr-xr-x 31 sdepold staff 1054 8 Jul 08:39 . | |
500726 drwxr-xr-x 42 sdepold staff 1428 7 Jul 09:53 .. | |
26292909 drwxr-xr-x 18 sdepold staff 612 8 Jul 08:52 buster | |
26289731 drwxr-xr-x 12 sdepold staff 408 8 Jul 08:40 buster-analyzer | |
26289945 drwxr-xr-x 19 sdepold staff 646 8 Jul 08:40 buster-assertions | |
26290596 drwxr-xr-x 11 sdepold staff 374 8 Jul 08:51 buster-autotest | |
26291618 drwxr-xr-x 15 sdepold staff 510 8 Jul 08:40 buster-capture-server | |
26292357 drwxr-xr-x 13 sdepold staff 442 8 Jul 08:40 buster-cli |
This file contains hidden or 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 Sequelize = require('sequelize') | |
, sequelize = new Sequelize('sequelize_test', 'root', null, { | |
logging: false | |
}) | |
var Project = sequelize.define('project', { | |
name: Sequelize.STRING | |
}) | |
var Task = sequelize.define('task', { |
This file contains hidden or 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 config = module.exports | |
config["node tests"] = { | |
tests: [ | |
"*.spec.js" | |
], | |
environment: "node" | |
} | |
config["browser tests"] = { |
This file contains hidden or 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 Sequelize = require('sequelize') | |
var sequelize = new Sequelize('sequelize_test', 'root') | |
var Person = sequelize.define('Person', { | |
firstName: Sequelize.STRING, | |
lastName: Sequelize.STRING | |
}, { | |
instanceMethods: { | |
getFullName: function() { | |
return [this.firstName, this.lastName].join(' ') |
This file contains hidden or 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
Layout.ScrumBoard = (function() { | |
"use strict" | |
var ScrumBoard = function() { | |
} | |
ScrumBoard.prototype.render = function() { | |
getActivities.call(this, function(data) { | |
console.log(data) |
This file contains hidden or 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
puts "!! unique-ifying category names" | |
mk_unique = lambda{ |c| c.update_attribute(:name, c.name + rand(8**16).to_s(36)); print "." } | |
Category.all.each{ |c| mk_unique[c] if c.name.empty? || (Category.find_all_by_name(c.name).size > 1) }; nil | |
puts "\n\n!! migrating gettext keys" | |
mk_migrate = lambda{ |c, gk| gk.update_attribute(:accesskey, "category.#{c.name.to_slug}"); print "." } | |
Category.all.each{ |c| (gk = GettextKey.find_by_accesskey("category.#{c.id}")) ? mk_migrate[c, gk] : print("X") }; nil |