Skip to content

Instantly share code, notes, and snippets.

@vuthanglong
vuthanglong / lab1.tcl
Last active January 29, 2024 21:01
lab1-NW
# lab1.tcl
# Create a Simulator
set ns [new Simulator]
# Create a trace file
set mytrace [open out.tr w]
$ns trace-all $mytrace
# Create a NAM trace file
@vuthanglong
vuthanglong / config.sh
Last active April 21, 2023 05:32
Automatically set up configuration files from my repo
git clone --bare https://github.com/vuthanglong/.config $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";