Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Passionate programmer

jianwu

💭
Passionate programmer
View GitHub Profile
@jianwu
jianwu / mshell
Last active October 27, 2021 12:50
mshell: to run jshell for a maven project with all the dependancies injected.
View mshell
# Run this script from the maven module directory to start a jshell with
# all dependent class paths injected.
# Please never run it on the parent maven project directory.
# It depends on java9 or above
if [ ! -d "target" ]; then
echo "Please run it under a module directory. And make sure it's not parent module directory. And make a maven install first"
exit
fi
@jianwu
jianwu / static_server.js
Last active January 21, 2023 10:50 — forked from ryanflorence/static_server.js
Node.JS static file web server, also provides CORSProxy, Http/Https proxy function. Put it in your path to fire up servers in any directory, takes an optional port argument. If provide second https port argument, it will also start https. For https to work, need to put key and cert file in the folder.
View static_server.js
#!/usr/bin/env node
const { argv } = require('process');
/**
Static http server implemented with NodeJS.
Features:
1. No external dependencies