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
{"lastUpload":"2018-11-22T13:37:58.709Z","extensionVersion":"v3.2.0"} |
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
let chalk = require('chalk'); | |
let moment = require("moment"); | |
let winston = require('winston'); | |
require('winston-mongodb'); | |
const { format } = require('winston'); | |
const { combine, timestamp, label, prettyPrint } = format; | |
const levels = { | |
error: 0, | |
warn: 1, |
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
let chalk = require('chalk'); | |
module.exports = function (app) { | |
/** | |
* CLIENT INTERACTION SYSTEM LOG | |
* | |
* @param {*} _message | |
* @param {*} _action | |
* @param {*} _type |
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
# ALIAS | |
alias lll='ls -Alhtr' # sorts files in dir by date | |
alias cl='clear' | |
alias mi='micro ' | |
alias nicer='python -m json.tool' | |
alias ccat='pygmentize -g -O style=colorful,linenos=1' | |
alias catline='pygmentize -g -O style=colorful,linenos=1' | |
alias xx='sudo systemctl start mariadb.service' | |
alias xxx='sudo systemctl stop mariadb.service' | |
alias zz='screen -dmS mongod mongod' |
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
formatBytes(bytes) { | |
if (bytes < 1024) { | |
return bytes + " Bytes"; | |
} else if (bytes < 1048576) { | |
return parseInt(Math.ceil(bytes / 1024).toFixed(3), 10) + " KB"; | |
} else if (bytes < 1073741824) { | |
return parseInt(Math.ceil(bytes / 1048576).toFixed(3), 10) + " MB"; | |
} else { | |
return parseInt(Math.ceil(bytes / 1073741824).toFixed(3), 10) + " GB"; | |
} |
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
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"rules": { | |
"semi": 2, | |
"indent": ["error", 2], | |
"arrow-body-style": [ ERROR, "always" ], | |
"arrow-parens": [ ERROR, "always" ], |
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
"files": { | |
"loopback#static": [ | |
{ | |
"paths": [ | |
"/" | |
], | |
"params": "$!../client/dist" | |
}, | |
{ | |
"paths": [ |
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
process.stdout.write('\033c'); |
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
// THIS EXAMPLE IS BASED ON LOOPBACK, BUT ANY LOGIC CAN REPLACE THE isAuthenticated() | |
import { Injectable } from '@angular/core'; | |
import { CanActivate } from '@angular/router'; | |
import { LoginApi } from './shared/sdk'; | |
@Injectable() | |
export class AuthGuard implements CanActivate { | |
constructor(private _loginApi: LoginApi) { } | |
canActivate() { |
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
multitail -C -c -n 1000 /path/to/file |
NewerOlder