Skip to content

Instantly share code, notes, and snippets.

View ohusq's full-sized avatar
🤔
thonk

ohusq ohusq

🤔
thonk
View GitHub Profile
from os import system
from pathlib import Path
def curl(url : str, filename : str, path : str):
if url == "":
return
print(f"cURL attempt on {url}")
call = system(f'cd {path} && curl "{url}" -o "{filename}"')
if call == 0:
@ohusq
ohusq / startup.bat
Created May 6, 2024 20:53
Load Visual Studio Code with cl.exe enabled, easy to use.
@echo off
setlocal
:: Path to the Visual Studio vcvars64.bat
set "VCVARS64_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
:: Check if the VC vars batch file exists
if not exist "%VCVARS64_PATH%" (
echo Error: Visual Studio 2022 Build Tools vcvars64.bat not found.
exit /b 1
@ohusq
ohusq / GoogleDorking.md
Created April 8, 2024 13:28 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
-- Make vectors like in C++ in Lua! | @ohusq
local Vector = {}
Vector.__index = Vector
function Vector.new(expectedType)
local self = setmetatable({}, Vector)
self.data = {}
self.expectedType = expectedType
return self
end
@ohusq
ohusq / color.cpp
Created February 26, 2024 13:35
C++20 Coloured output, simple and resets
#include <iostream>
#include <string>
#include <windows.h>
enum color { red = 12, yellow = 14, white = 15, DEFAULT_VALUE = 7 };
const char* ERROR_LABEL = "[ERR]"; // error
const char* WARNING_LABEL = "[WARN]"; // warning
const char* INFO_LABEL = "[INFO]"; // info
@ohusq
ohusq / func.lua
Created March 16, 2023 15:57
Roblox functions character
local function GetCharacter(charName)
return game.Players:GetPlayerFromCharacter(charName) or game.Players[charName]
end