Skip to content

Instantly share code, notes, and snippets.

View seanpmaxwell's full-sized avatar
🎯
Focusing

Sean Maxwell seanpmaxwell

🎯
Focusing
View GitHub Profile
@felipou
felipou / decrypt_dbeaver.py
Last active February 11, 2025 10:48
DBeaver password decryption script - for newer versions of DBeaver
# 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
@seanpmaxwell
seanpmaxwell / package.json
Last active May 29, 2019 05:38
TypeScriptFullStackShell/package.json
{
"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"
@seanpmaxwell
seanpmaxwell / DemoServer.ts
Last active May 29, 2019 05:25
TypeScriptFullStackShell/src/DemoServer.ts
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: ';
@seanpmaxwell
seanpmaxwell / tsconfig.json
Last active October 31, 2018 03:34
Enforce Type Safety in TypeScript
{
"compileOnSave": false,
"compilerOptions": {
"noImplicitAny": true, <--- Add this option
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
export class UserController {
getRoutes(): Router {
let router = express.Router();
router.get('/api/users/:id', [middleware1, middleware2], (req, res, next) => {
this.get(req, res, next);
}
@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'});
}
}
@cecilemuller
cecilemuller / launch.json
Last active April 4, 2025 13:08
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@themeteorchef
themeteorchef / timezones.js
Last active September 12, 2024 13:11
Array of timezones as objects, sorted by offset and name.
[
  {
    "offset": "GMT-12:00",
    "name": "Etc/GMT-12"
  },
  {
    "offset": "GMT-11:00",
    "name": "Etc/GMT-11"
  },
  {