Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <pthread.h>
#include <unistd.h>
#include <cstdint>
#define BYTES_TO_MB(x) ((double)(x) / (1024.0 * 1024.0))
inline void printStackUsage()
{
volatile int localVar;
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local Job = require("plenary.job")
local M = {}
M.search = function(opts)
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@w1redch4d
w1redch4d / is_number.c
Last active May 16, 2025 02:50
To All NodeJS Devs downloading is_even and is_odd from npm this is how fuckin simple it is
#include <stdio.h>
// actual logic
char* is_number(int num) {
char* type[2] = {"Even", "Odd"};
return type[num % 2];
}
// how to use
int main() {
import requests
import itertools
import json
import sys
import distro
def main():
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
@w1redch4d
w1redch4d / enable.ps1
Created September 16, 2024 16:17
Enable windefend
Param([Parameter(Mandatory=$false)][switch]$shouldAssumeToBeElevated, [Parameter(Mandatory=$false)] [String]$workingDirOverride)
# If parameter is not set, we are propably in non-admin execution. We set it to the current working directory so that
# the working directory of the elevated execution of this script is the current working directory
if(-not($PSBoundParameters.ContainsKey('workingDirOverride')))
{
$workingDirOverride = (Get-Location).Path
}
function Test-Admin {
typedef struct _PS_ATTRIBUTE
{
ULONG_PTR Attribute; // PROC_THREAD_ATTRIBUTE_XXX | PROC_THREAD_ATTRIBUTE_XXX modifiers, see ProcThreadAttributeValue macro and Windows Internals 6 (372)
SIZE_T Size; // Size of Value or *ValuePtr
union
{
ULONG_PTR Value; // Reserve 8 bytes for data (such as a Handle or a data pointer)
PVOID ValuePtr; // data pointer
};
PSIZE_T ReturnLength; // Either 0 or specifies size of data returned to caller via "ValuePtr"
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "xyz.com" `
@w1redch4d
w1redch4d / ida_layout.json
Created July 12, 2024 17:26
MY IDA layout
{
"layout": {
"main": {
"type": "vsplit",
"children": [
{
"type": "hsplit",
"children": [
{
"type": "vsplit",
@w1redch4d
w1redch4d / OpenSourceIsNotAboutYou.md
Created June 23, 2024 14:22 — forked from richhickey/OpenSourceIsNotAboutYou.md
Open Source is Not About You

Open Source is Not About You

The only people entitled to say how open source 'ought' to work are people who run projects, and the scope of their entitlement extends only to their own projects.

Just because someone open sources something does not imply they owe the world a change in their status, focus and effort, e.g. from inventor to community manager.

As a user of something open source you are not thereby entitled to anything at all. You are not entitled to contribute. You are not entitled to features. You are not entitled to the attention of others. You are not entitled to having value attached to your complaints. You are not entitled to this explanation.

If you have expectations (of others) that aren't being met, those expectations are your own responsibility. You are responsible for your own needs. If you want things, make them.