{
"Print to console": {
"prefix": "log",
"description": "Log output to console",
"body": [
"console.log('$1');",
"$2"
]
},
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
Gamer.findOrCreate({username:'whiplash'}) | |
.then(function(user){ | |
return Gamelog.create({gamerId: user.id}); | |
}) | |
then.(function(gamelog){ | |
return Game.findOrCreate({title: 'Star Citizen'}) | |
.then(function(game){ | |
gamelog.gameId = game.id; | |
gamelog.save(); | |
}); |
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 keys = []; | |
for(var k in r.app.models) keys.push(k); | |
console.log(keys); |
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
for (var model in r.app.models) { | |
this[model] = r.app.models[model]; | |
} |
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 Gamers = require('Gamers'); | |
var Games = require('Games'); | |
var discord = require('discord.js'); | |
var config = require('config'); | |
var Promise = require('bluebird'); | |
module.exports = Bot; | |
function Bot(app) { | |
var _this = this; |
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
[16:45:54] Starting 'ngdoc'... | |
[16:45:54] Server started http://localhost:9001 | |
C:\Workspaces\magnises-storybook\node_modules\gulp-ngdocs\src\example.js:142 | |
out.push(' ng-set-html="' + this.html[0].id + '"'); | |
^ | |
TypeError: Cannot read property 'id' of undefined | |
at exports.Example.toHtmlEmbed (C:\Workspaces\magnises-storybook\node_modules\gulp-ngdocs\src\example.js:142:43) | |
at exports.Example.toHtml (C:\Workspaces\magnises-storybook\node_modules\gul |
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
{ | |
"Print to console": { | |
"prefix": "log", | |
"description": "Log output to console", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
] | |
}, | |
"Create basic Promise": { |
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
{ | |
"Print to console": { | |
"prefix": "log", | |
"description": "Log output to console", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
] | |
}, | |
"Create basic Promise": { |
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
@echo off | |
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f |
- 1: All external online API's should be wrapped into our own services.
- This provides a general guideline for developers when they make calls to a said service
- We avoid issues if a service changes their api somewhere, as tests would fail.
- 2: Services should have 100% static methods.
- API State should be maintained only on the external side of things.
- This avoids use of any global state making things more predictable and reproducable.
OlderNewer