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
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection | |
# requires pycryptodome lib (pip install pycryptodome) | |
import sys | |
import base64 | |
import os | |
import json | |
from Crypto.Cipher import AES |
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
{ | |
"name": "typescriptfullstackshell", | |
"version": "1.0.0", | |
"description": "demonstrate how to do full-stack TypeScript development", | |
"main": "build/demo.bundle.js", | |
"scripts": { | |
"start": "npm install --only=prod && NODE_ENV=production node ./build/start.js", | |
"start-dev": "nodemon --config \"./util/nodemon.json\"", | |
"test": "ts-node src/start.ts test", | |
"build": "sh ./util/buildForProd.sh" |
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
import * as path from 'path'; | |
import * as express from 'express'; | |
import * as bodyParser from 'body-parser'; | |
import * as controllers from './controllers'; | |
import { Server } from '@overnightjs/core'; | |
import { Logger } from '@overnightjs/logger'; | |
class DemoServer extends Server { | |
private readonly SERVER_START_MSG = 'Demo server started on port: '; |
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
Show hidden characters
{ | |
"compileOnSave": false, | |
"compilerOptions": { | |
"noImplicitAny": true, <--- Add this option | |
"baseUrl": "./", | |
"outDir": "./dist/out-tsc", | |
"sourceMap": true, | |
"declaration": false, | |
"module": "es2015", | |
"moduleResolution": "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
export class UserController { | |
getRoutes(): Router { | |
let router = express.Router(); | |
router.get('/api/users/:id', [middleware1, middleware2], (req, res, next) => { | |
this.get(req, res, next); | |
} |
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
@Controller('api/users') | |
export class UserController { | |
@Get(':id') | |
@Middleware([middleware1, middleware2]) | |
get(req: Request, res: Response, next: NextFunction): any { | |
console.log(req.params.id); | |
return res.status(200).json({msg: 'get_called'}); | |
} | |
} |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Example", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "node", | |
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], |
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
[ | |
{ | |
"offset": "GMT-12:00", | |
"name": "Etc/GMT-12" | |
}, | |
{ | |
"offset": "GMT-11:00", | |
"name": "Etc/GMT-11" | |
}, | |
{ |