Skip to content

Instantly share code, notes, and snippets.

@rphlmr
rphlmr / clear-db.ts
Last active May 13, 2024 00:57
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@xt0rted
xt0rted / README.md
Last active May 13, 2024 00:54
Auto-merge Dependabot PRs for minor & patch updates

README

Note

I'm now using a newer version of this workflow that supports an allow list for individual packages and update groups which can be found here:

If you're using a workflow like this and need to manage secrets in multiple repos xt0rted/secrets-sync can simplify that. This lets you add secrets to one repo and sync them to many repos. There's also a template you can fork to get started quickly with it.

Personal Access Token

@mdabdulripon
mdabdulripon / MYSQL.md
Last active May 13, 2024 00:42
Create local instance of MySQL database and Access it from the terminal

Download and Install MySQL on your local machine:

Access my SQL from the terminal.

cd /usr/local

Perform ls to List all the files and directories

@evilactually
evilactually / CMakeLists.txt
Created August 8, 2016 21:00
Compiling GLSL to SPIR-V from CMake
if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(GLSL_VALIDATOR "$ENV{VULKAN_SDK}/Bin/glslangValidator.exe")
else()
set(GLSL_VALIDATOR "$ENV{VULKAN_SDK}/Bin32/glslangValidator.exe")
endif()
file(GLOB_RECURSE GLSL_SOURCE_FILES
"shaders/*.frag"
"shaders/*.vert"
)
@maxwell-bland
maxwell-bland / sp.txt
Created January 30, 2022 20:22
How to use symbolic propagator ghidra
Python Interpreter for Ghidra
Based on Jython version 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58)
[OpenJDK 64-Bit Server VM (Private Build)]
Press 'F1' for usage instructions
>>> import ghidra.program.util.ContextEvaluatorAdapter
>>> import ghidra.program.util.ContextEvaluatorAdapter
>>> i = getInstructionAt(currentAddress)
>>> i
MOV ESI,0xa
>>> i.getOpObjects(1)
@juligaioso
juligaioso / #30DaysOfCTF
Last active May 13, 2024 00:34
30 days of CTF
For the next 30 days, I decided to improve my pentesting skills. So, inspired in the challenge of #100DaysOfCode, i create the challenge #30DaysOfCTF.
## Main Rules:
1. Resolve a CTF challenge every day;
2. Create and publish a WriteUp about the CTF;
3. Share my progress and the WriteUp in the social midia with the hashtag #30DaysOfCTF.
My #30DaysOfCTF starters in 05/13/2024.
@buxx
buxx / aiopoc.py
Created July 24, 2018 12:44
aiohttp stream response example
from aiohttp import web
async def handle(request):
response = web.StreamResponse(
status=200,
reason='OK',
headers={'Content-Type': 'text/plain'},
)
await response.prepare(request)
@diego3g
diego3g / settings.json
Last active May 13, 2024 00:31
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {