Skip to content

Instantly share code, notes, and snippets.

View lackdaz's full-sized avatar

Seth Loh lackdaz

View GitHub Profile
@lackdaz
lackdaz / wireguardvpn_installation.md
Created April 9, 2025 23:23 — forked from teja156/wireguardvpn_installation.md
Commands to install Wireguard VPN

Commands to install Wireguard VPN on Ubuntu

YouTube Video: https://youtu.be/SzSSll7nJnI

SERVER

Install Wireguard

sudo apt update
sudo apt install wireguard
@lackdaz
lackdaz / settings.json
Created July 8, 2021 15:10
default vscode settings.json for python
{
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"python.pythonPath": "/usr/bin/python3",
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "pytest",
"python.testing.pytestArgs": ["-xvs", "--cov=tb_troll", "--cov-report=html", "tests/"]
}
@lackdaz
lackdaz / INSTALL.md
Last active December 2, 2020 00:39
ML Installation steps for Linux
@lackdaz
lackdaz / README.md
Last active July 7, 2021 09:51
Removing __MACOSX and .DS_Store artefacts from zip files (MacOSX Only)

Be a better MacOSX Developer

The Problem .DS_Store and __MACOSX files have littered servers, codebases and your colleague's workstations since Apple Inc. decided that MacOSX browsing speeds was more important than the general hygiene of the internet. Here's a cheatsheet to help you clean up after yourself.

Zipping without artefacts

zip -r data.zip . -x ".DS_Store" -x "__MACOSX"

Removing injects from existing zip files

@lackdaz
lackdaz / x86_deepstream_install.md
Last active September 8, 2020 17:07
Installation steps for Deepstream 5.0 for x86_64

remove previous gst installations:

$ sudo rm -rf /usr/local/deepstream /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnv* /usr/bin/deepstream* /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst*
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream*
/opt/nvidia/deepstream/deepstream*
$ sudo rm -rf /usr/lib/x86_64-linux-gnu/libv41/plugins/libcuvidv4l2_plugin.so

install dependencies

@lackdaz
lackdaz / tick-tock.txt
Last active June 18, 2020 14:25
Yet another spinner code: tick tock reboot
#!/bin/bash
# Copyright (c) 2020, lackdaz
# All rights reserved.
### Contributions
# Written by Seth Loh Wei Chen github.com/lackdaz
# Contribution by John Rehwinkel gitlab.com/bodger
# Share with me the modifications in the comments below!!
###
@lackdaz
lackdaz / fix-jetson-io
Created June 12, 2020 16:59
run to fix the jetson-io bug
sudo find /opt/nvidia/jetson-io/ -mindepth 1 -maxdepth 1 -type d -exec touch {}/__init__.py \;
@lackdaz
lackdaz / delete-known-host.sh
Last active June 11, 2020 15:10
deletes a known_hosts entry with pattern matching port 3095
sed '/3095/d' ~/.ssh/known_hosts > ~/.ssh/known_hosts
@lackdaz
lackdaz / monitor.sh
Created May 28, 2020 16:51
credit to @aneisch for developing this script to monitor SSH connections on an ubuntu device
#!/bin/bash
authorized_keys="/home/seth/.ssh/authorized_keys"
ssh_login_file="/var/log/auth.log"
ports=$(netstat -tn -o state established | grep -F ":22" | awk '{ print $5 }' | sed -e 's/.*://')
echo "Active logins:"
# Iterate through established peer ports connected to :22