Skip to content

Instantly share code, notes, and snippets.

@tnhung2011
tnhung2011 / EnvShortcut.vbs
Created July 5, 2025 02:29
Creates a shortcut for convenient access to environment variables (could be placed in `Start Menu` folder)
Set h = WScript.CreateObject("WScript.Shell")
Set oLink = h.CreateShortcut(".\Environment Variables.lnk")
oLink.TargetPath = "%SystemRoot%\System32\rundll32.exe"
oLink.Arguments = "sysdm.cpl,EditEnvironmentVariables"
oLink.IconLocation = "%SystemRoot%\System32\shell32.dll,104"
oLink.Save
@echo off
prompt [$P]^
$$$S
@echo on
@tnhung2011
tnhung2011 / rocursor.bat
Last active July 5, 2025 06:25
A handy program for customizing your Roblox cursor (ANSI-encoded) (now a kludge for people who hate Bloxstrap)
@echo off
setlocal
set __p=%systemroot%\System32\WindowsPowershell\v1.0\powershell.exe
2>nul >nul %__p% /?
if not errorlevel 0 goto :eof
set stop=:eof
set internal=%~n0
set program=RoCursor
#include <stdio.h>
int main() {
for (char i = 0; i < 127; i++)
printf("%s", &i);
}
@tnhung2011
tnhung2011 / build_windows.yml
Last active September 10, 2023 13:16
Builds Tauri applications for Windows (x64, x86), then draft a release
name: Build executable
on: workflow_dispatch
env:
name: PLACE_REPO_NAME_HERE
CARGO_TERM_COLOR: always
jobs:
build:
@tnhung2011
tnhung2011 / README.md
Created August 30, 2023 09:15 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@tnhung2011
tnhung2011 / grabUnusedFiles.js
Last active July 12, 2023 02:00
Grab unused files on a page of Special:UnusedFiles
Array.prototype.forEach.call([].slice.call(document.querySelector("#gallery-0").childNodes, 1), function(elem) {
console.log(decodeURI(/(File:.+?)\?/gm.exec(elem.childNodes[0].href)[1]));
});
@echo off
for /F "skip=2 tokens=3*" %%A in ('reg query "HKCU\Software\ROBLOX Corporation\Environments\roblox-player" /ve') DO (set robloxpath=%%A)
setlocal DisableDelayedExpansion
set splitter=\RobloxPlayerLauncher.exe
setlocal EnableDelayedExpansion
set LF=^
rem ** Two empty lines are required
@tnhung2011
tnhung2011 / taskkiller.bat
Created August 29, 2022 01:05
A simple batch script to terminate background tasks
@echo off
set args=%*
if [%args%] EQU [] (
tasklist
set /p args=Taskname to kill:^
)
taskkill /f /im %args%
@tnhung2011
tnhung2011 / APLIAFCLDTCITAMPAC.lua
Last active January 20, 2024 19:20
Simple implementation of the "A programming language is any set of rules that converts strings, or graphical program elements in the case of visual programming languages, to various kinds of machine code output." (abbreviated Programming Language or APLIAFCLDTCITAMPAC) programming language.
valid_string = 'A programming language is any set of rules that converts strings, or graphical program elements in the case of visual programming languages, to various kinds of machine code output.'
function file_exists(file)
local f = io.open(file, 'rb')
if f then f:close() end
return f ~= nil
end
function parse(command)
if command == valid_string then