Skip to content

Instantly share code, notes, and snippets.

@cobinrox
cobinrox / blue.ahk
Created October 20, 2025 12:47
GitBash Colored Terminal with AutoHotKey
#Requires AutoHotkey v2.0
#SingleInstance Force
; --- MODIFIED: Easily tweakable settings ---
foreground := "0,0,0" ;
background := "0,0,139" ; darkblue
; background := "75,0,130" ; purple
; background := "112,128,144" ; gray
; background := "128,0,0" ; maroon
; background := "107,142,35" ; olive green
@cobinrox
cobinrox / openwebui_info.md
Last active January 4, 2025 21:20
Notes for openwebui
@cobinrox
cobinrox / README.md
Last active December 25, 2024 17:13
Set up Ubuntu 18.0.4 User in Kiosk Mode

Kiosk Mode User

These steps should be able to help you create a stand-alone user account on Ubuntu 18.0.4 that, when logged into, will run only the VLC application.

Theory of Operation

When the user logs in, the Ubu's "lightdm" will be directed to the user's .drmc file which in turn will be directed to an "openbox" configuration. The openbox config will specify that only the VLC app can be run.

Install Dependencies

sudo apt update
sudo apt install openbox
@cobinrox
cobinrox / nsexe.bat
Last active May 13, 2024 13:31
windows see if particular port is in use and print out exe's assoc with any ports in use using netstat cmd
@echo off
@REM run netstat to search for a particular port, if provided on cmd line by user
@REM also run netstat to search for all in-use ports AND show exe files
@REM
@rem usage:
@rem nsexe.bat
@rem will print out in-use ports and exe's assoc/w ports
@rem (requires elevated privs)
@rem nsexe.bat 4200
@rem will print out whether or not given port is in use
@cobinrox
cobinrox / angular_for_java.md
Created May 8, 2024 15:38
angular_for_java.md

File Execution/Start Up

  1. main.ts "bootstraps" app\app.module.ts\AppModule class
  2. AppModule contains an array of compomnents, one of which is the "root" component, app\app.component.ts\AppComponent
+---------+      +----------------+      +------------------+
| main.ts | -->  | app.module.ts  | ---> | app.component.ts |
+---------+      +----------------+      +------------------+

@cobinrox
cobinrox / gist:4038d8d8924977d2b1e2edc243b9e04c
Created January 29, 2024 01:02
Batch file move files to YYYY-MM subdirectories
@echo off
@REM Moves loose files into subdirectories, where the subdirs are
@REM created based on the year and month of the original files
@REM
:: echo "Changing to documents directory..."
:: cd C:\Users\%username%\gitprojects\bats
::
:: echo Checking that we are in the Documents directory...
:: if "%cd%"=="C:\Users\%username%\Documents" (
@cobinrox
cobinrox / create_files.bat
Created January 29, 2024 01:01
Batch file create many files
@echo off
set "count=0"
for /f "tokens=1-4 delims=:. " %%a in ("%time%") do (
set "timestamp=%%a%%b%%c%%d"
)
:loop
if %count% geq 5000 goto :eof
@cobinrox
cobinrox / chkadmin.bat
Created December 13, 2023 14:04
Check admin privs
echo off
echo Administrative permissions required. Detecting permissions...
net session
set el=%errorLevel%
if %el% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: Current permissions inadequate.
)
@cobinrox
cobinrox / cdu.bat
Created December 13, 2023 14:01
Change to current user's home dir
cdu C:\Users\%whoami%
@cobinrox
cobinrox / cw.bat
Created December 13, 2023 14:00
WHITE terminal
@REM purple on WHITE
color 75
@REM
@REM Change color of command terminal
@REM color BackgroundForground, e.g. color 60
@REM Black on Yellow: color 60
@REM White on Blue: color 17
@REM Black on White: color 70