Skip to content

Instantly share code, notes, and snippets.

View sunb0002's full-sized avatar

sunb0002 sunb0002

  • Singapore
View GitHub Profile
'use strict';
const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
const app = express();
app.use('/aaa/bbb/ccc/', createProxyMiddleware({
target: 'http://10.1.2.3:1234',
changeOrigin: true,
pathRewrite: {
#!/usr/bin/env node
'use strict';
const usage = () => console.log(`
Usage:
node config-env.js <envKey>
(e.g node config-env.js sit-ocip)
The script will replace config.json with config-<envKey>.json in /build folder,
and remove all config-*.json in the same folder.
`);
del /f/s/q foldername > nul
rmdir /s/q foldername
#!/bin/bash
#http-server -p 1234 --cors ./poc > ./poc/http.log 2>&1 &
#pkill http-server
A.removeAll(B);
A.addAll(B);
const usage = () => console.log(`
Usage:
node decoder.js <file-path>
The script will decode any base64-encoded value for each line,
and create x.decoded.xml under the same folder.
`);
if (process.argv.length < 3) {
usage();
process.exit(0);
ssh -F ssh/config -N -L 1622:db-server-host:1622 jump-host-ssh-alias
sqlplus "user/pwd@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=localhost)(Port=1622))(CONNECT_DATA=(SERVICE_NAME=THE_DB_SCHEMA)))"
let rm = angular.element(document.body).injector().get("RM");
rm.email = "my.email@hotmail.com"
angular.element(document.body).injector().get('MyDataService').getRmEmail();
ls *finanti*.sql | grep -E -v "^(1B|1C)" | xargs -I {} echo "-f {}" | xargs
// xargs supports parallel execution.