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
// to resolve nodemon and babel-node in cli | |
{ | |
"scripts": { | |
"server:watch": "./node_modules/.bin/nodemon ./app/server/index.js --exec ./node_modules/.bin/babel-node" | |
} | |
} |
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
useJava () { | |
JDK6="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" | |
JDK7="/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home" | |
JDK8="/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home" | |
case "$1" in | |
"6") | |
echo "Using JDK6: ${JDK6}" | |
export JAVA_HOME="{$JDK6}/bin" |
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
Hello there. |
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 express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var app = express(); | |
app.get("/css/*",function(req,res){ | |
res.sendfile('app'+req.path); | |
}); | |
app.get("/js/*",function(req,res){ | |
res.sendfile('app'+req.path); |
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
// Run with: grunt switchwatch:target1:target2 to only watch those targets | |
grunt.registerTask('switchwatch', function() { | |
var targets = Array.prototype.slice.call(arguments, 0); | |
Object.keys(grunt.config('watch')).filter(function(target) { | |
return !(grunt.util._.indexOf(targets, target) !== -1); | |
}).forEach(function(target) { | |
grunt.log.writeln('Ignoring ' + target + '...'); | |
grunt.config(['watch', target], {files: []}); | |
}); | |
grunt.task.run('watch'); |
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
{ | |
"use_simple_full_screen": false, | |
// calculates indentation automatically when pressing enter | |
"auto_indent": true, | |
// sets the colors used within the text area (default) | |
// see https://github.com/olivierlacan/monokaim to download | |
// the customized Monokai I use. | |
"color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme", |
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
// Create registry | |
// order is wrong | |
$routeProvider | |
.when('/create', {templateUrl: 'partials/guide/create-registry.html', controller: 'create-registry'}) | |
.when('/create/:type', {templateUrl: 'partials/guide/create-registry.html', controller: 'create-registry'}) | |
.otherwise({redirectTo: '/create'}); | |
// should be | |
$routeProvider | |
.when('/create/:type', {templateUrl: 'partials/guide/create-registry.html', controller: 'create-registry'}) |
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 max = 128, | |
maxLength = max.toString().length > 1 ? max.toString().length : 2, | |
maxRoundedUp = Math.ceil(max/Math.pow(10,maxLength) * 10) * Math.pow(10,maxLength-1); |
NewerOlder