Skip to content

Instantly share code, notes, and snippets.

View kntjspr's full-sized avatar
🦉

Kent Jasper Cabunoc Sisi kntjspr

🦉
  • PGP: 8FED 9D2E 4BA4 7F01 5603 0740 980F 354B 5EEF 0B51
View GitHub Profile
@kntjspr
kntjspr / a.md
Last active February 15, 2026 20:28
aws autoscaling

tail -f /var/log/user-data.log

sudo cat /var/lib/cloud/instance/user-data.txt

find asg by tag

aws autoscaling describe-auto-scaling-groups
--filters Name=tag:Environment,Values=Production
--query 'AutoScalingGroups[].AutoScalingGroupName'
--output text

@kntjspr
kntjspr / disconnect.bat
Created February 11, 2026 16:23
rdp session disconnect for pyautogui
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console )
pause
@kntjspr
kntjspr / script.sh
Created February 10, 2026 19:45
aws ubuntu intial setup
# update and install XFCE + XRDP
sudo apt update && sudo apt upgrade -y
sudo apt install -y xfce4 xfce4-goodies xrdp xvfb python3-pip
# configure XRDP to use XFCE
echo "xfce4-session" > ~/.xsession
sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp
# install chrome
@kntjspr
kntjspr / user.js
Created January 27, 2026 17:42
Social media blocker userscript
// ==UserScript==
// @name Social Media Blocker - Instagram Reels & Facebook Newsfeed
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Blocks Instagram Reels and Facebook Newsfeed with temporary disable option
// @author https://github.com/kntjspr
// @match https://www.instagram.com/*
// @match https://instagram.com/*
// @match https://www.facebook.com/*
// @match https://facebook.com/*
@kntjspr
kntjspr / setup.sh
Created January 4, 2026 18:41
"Things To Do!" script for a fresh Fedora Workstation installation
#!/bin/bash
# "Things To Do!" script for a fresh Fedora Workstation installation
# Check if the script is run with sudo
if [ "$EUID" -ne 0 ]; then
echo "Please run this script with sudo"
exit 1
fi
@kntjspr
kntjspr / codecs.sh
Last active December 15, 2025 17:16
fedora codecs
# Free and Non-Free repos
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg gstreamer1-libav gstreamer1-plugins-ugly gstreamer1-plugins-bad-free --allowerasing
@kntjspr
kntjspr / git-setup.sh
Last active December 5, 2025 18:45
Setup git alias to configure git per repo
#!/bin/bash
# --- INSTALL WRAPPER ---
INSTALL_DIR="$HOME/.local/bin"
INSTALL_PATH="$INSTALL_DIR/git-setup"
BASHRC="$HOME/.bashrc"
mkdir -p "$INSTALL_DIR"
if [ "$(basename "$0")" != "git-setup" ]; then
@kntjspr
kntjspr / tmux.md
Last active January 18, 2026 11:25
Multiple workflow with tmux
tmux new -s mysession

run commands inside tmux

detach

Ctrl+B then D

safely close SSH/Putty

Later, reconnect and reattach:

tmux ls
@kntjspr
kntjspr / install.sh
Last active November 3, 2025 11:04
Install linux essentials (Debian)
#!/bin/bash
set -e
# Change this based on your preference
printf '\ncd /mnt/c/Users/user0/Desktop\n' >> ~/.bashrc # Sets terminal on launch to navigate to that directory
echo 'alias desktop="cd /mnt/c/Users/user0/Desktop"' >> ~/.bashrc
echo 'alias py="python3"' >> ~/.bashrc # set alias py to python3
source ~/.bashrc
@kntjspr
kntjspr / PUSH.sh
Last active November 27, 2025 13:35
Copy files to PROD/DEV directory, encrypts and PUSH!!
#!/bin/bash
# THIS SCRIPT IS FOR PUSHINGGGGGGG!!
# ✅PUSHING SCRIPT
# ❌PULL❌
# Fix GPG signing in WSL
export GPG_TTY=$(tty)
# Parse command line arguments