Skip to content

Instantly share code, notes, and snippets.

@m10i-0nyx
m10i-0nyx / metasploit.sh
Last active April 1, 2025 09:16
Shell to run Metasploit framework in podman.
#!/bin/bash
podman run \
-it \
--privileged \
--rm \
--name metasploit \
docker.io/metasploitframework/metasploit-framework:6.4.0 \
bash -c "./msfconsole -r docker/msfconsole.rc"
@MrPaXe
MrPaXe / JetBrainsTrial.bat
Last active February 1, 2026 13:42
Infinite Jetbrains Resharper trial
:: This bat file can be used to renew Resharper C# and Resharper C++ every time it runs out
:: It most likely works for all Jetbrains tools, however, I did not test this.
:: I was not able to find the original author for the reg key and the folders that needs to be deleted so if that is you feel free to reach out for credit
@echo off
setlocal enableDelayedExpansion
:confirm
echo Did you stop all Jetbrains services?
echo Jetbrains toolbox AND any other tool using it such as Rider, Visual Studio, ...
@devinschumacher
devinschumacher / 01_save_state.py
Last active August 25, 2025 08:56
how to save & reuse authentication / login state with playwright python
import os
from playwright.sync_api import sync_playwright
def setup_authentication():
with sync_playwright() as playwright:
browser = playwright.firefox.launch(headless=False, slow_mo=500)
context = browser.new_context()
page = context.new_page()
@ugovaretto
ugovaretto / result-example.cpp
Last active May 4, 2025 08:02
Rust-style C++ Result implementation, supporting references
// Implementation of Result<Result,Error> type a la Rust.
// author: Ugo Varetto
// License: Zero-clause BSD
// SPDX identifier: 0BSD
#include "result.h"
//-----------------------------------------------------------------------------
Result<int, std::string> Foo(int i) {
if (i == 0) {
return Err(std::string("Error"));
} else {
@MRW01F
MRW01F / ASLR_DEP.ps1
Created April 26, 2023 11:02
A powershell script to Enable/Disable, ASLR & DEP. Mainly for security testing purpose. !!! DO NOT RUN THIS SCRIPT ON PERSONAL/WORK DEVICE !!!
# Prompt the user for input
$choice = Read-Host "Enter 1 to enable DEP and ASLR, 2 to disable DEP and ASLR"
if ($choice -eq "1") {
# Enable DEP and ASLR
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "MoveImages" -Value 1
bcdedit.exe /set {current} nx AlwaysOn
Write-Host "DEP and ASLR have been enabled."
}
elseif ($choice -eq "2") {
@YodaEmbedding
YodaEmbedding / .clang-format
Last active January 16, 2026 07:49
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@chamindac
chamindac / win10dockerinstallwsl2.ps1
Last active July 5, 2025 21:55
This script automates installation of Docker Desktop on Windows 10 and uses WSL2
set-executionpolicy -scope CurrentUser -executionPolicy Bypass -Force
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
# Relaunch as an elevated process:
Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs
exit
}
$ProgressPreference = 'SilentlyContinue'
@balintkissdev
balintkissdev / .clang-tidy
Created March 15, 2021 20:04
Using clang-tidy from CMake
Checks: "bugprone-*,clang-diagnostic-*,clang-analyzer-*,modernize-*,performance-*,readability-*"
WarningsAsErrors: ""
HeaderFilterRegex: ""
CheckOptions:
- key: readability-identifier-naming.PrivateMemberSuffix
value: "_"
(In both Windows)
1. Go to C:\Users\{USER}\AppData\Roaming\AnyDesk
2. Copy & Paste 'thumbnails'
3. Open 'user.conf'
4. Replace the line 'ad.roster.items='
5. Done.
@bonniss
bonniss / github-search-cheatsheet.md
Last active March 12, 2026 14:07
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search