Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
Sublime regex for remove _id from export | |
, "_id" : \{ "\$oid" : ".*?" \} | |
Regex not greedy | |
* - zero or more | |
*? - zero or more (non-greedy) | |
+ - one or more |
var log = Function.prototype.call.bind(console.log, console); | |
var error = Function.prototype.call.bind(console.error, console); | |
var info = Function.prototype.call.bind(console.info, console); |
//Syntatic sugar to add methods to any function faster | |
Function.prototype.method = function (name, func) { | |
this.prototype[name] = func; | |
return this; | |
}; | |
//Example | |
//for any class... | |
function HelloClass(){ |
var oldObj = { | |
first: function() {}, | |
second: function() {} | |
}; | |
var newObj = Object.create(oldObj); | |
newObj.third = function() {}; |
//In this way we prevent 2 things: | |
// 1- Polute the global scope | |
// 2- The creation of the array name each time digitToName is called | |
var digitToName = (function(digit){ | |
var names = ['one', 'two', 'tree'] | |
return function(){ | |
return names[digit]; | |
} | |
}()); |
Show the filename without line breaking, and wait for changes. | |
less -S +F filename |
console.table({ | |
"01 - moment('2016-04-14T00:00:00+00:00').format()": moment('2016-04-14T00:00:00+00:00').format(), | |
"02 - moment.utc('2016-04-14T00:00:00+00:00').format()": moment.utc('2016-04-14T00:00:00+00:00').format(), | |
"03 - moment('2016-04-14T00:00:00+01:00').format()": moment('2016-04-14T00:00:00+01:00').format(), | |
"05 - new Date('2016-04-14T00:00:00+00:00')": new Date('2016-04-14T00:00:00+00:00'), | |
"04 - new Date(Date.parse('2016-04-14T00:00:00+00:00'))": new Date(Date.parse('2016-04-14T00:00:00+00:00')), | |
"09 - moment('2016-04-14T00:00:00+00:00').tz('Europe/London').format()": moment('2016-04-14T00:00:00+00:00').tz('Europe/London').format(), | |
"10 - moment.utc('2016-04-14T00:00:00+00:00').tz('Europe/London').format()": moment.utc('2016-04-14T00:00:00+00:00').tz('Europe/London').format(), | |
}); |
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
# Setup an user | |
user: | |
Type: AWS::IAM::User | |
Properties: | |
UserName: !Join | |
- '-' | |
- - 'changeme' |
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Current file", | |
"program": "${workspaceFolder}/node_modules/.bin/jest", | |
"args": [ | |
"${file}" |