Skip to content

Instantly share code, notes, and snippets.

View soda92's full-sized avatar

Maple soda92

View GitHub Profile
gcc -c -Wall -Werror -fPIC lib.c
gcc -shared -o lib.dll lib.o
@soda92
soda92 / runfile.ps1
Last active March 14, 2022 06:55
Useful script for compiling and running java
# Environment: PowerShell 7
# Install: put runfile.ps1 in project directory
# create subdirectory lib
# download and put the algs4.jar in lib subdirectory
# Usage:
# it will auto detect args or file as input
# .\runfile.ps1 HelloWorld.java <- no argument or input
# .\runfile.ps1 HelloGoodbye.java aa bb <- passing args aa and bb
# .\runfile.ps1 RandomWord.java <- interactive run (read from stdin)