Skip to content

Instantly share code, notes, and snippets.

@believer
believer / raycast-jira-to-tana.mjs
Last active May 22, 2024 02:28
Script for Raycast that takes a Jira link, fetches information from Jira's REST API, and converts it to Tana's paste format
#!/usr/bin/env node
// Required parameters:
// @raycast.schemaVersion 1
// @raycast.title Jira fetcher
// @raycast.mode silent
// Optional parameters:
// @raycast.icon 🤖
// @raycast.argument1 { "type": "text", "placeholder": "Jira URL" }
@SkyN9ne
SkyN9ne / WoW64_call.cpp
Created May 22, 2024 02:25 — forked from Cr4sh/WoW64_call.cpp
WoW64 Heaven's Gate
#include "stdafx.h"
#define DB(_val_) __asm __emit (_val_)
#define INVALID_SYSCALL (DWORD)(-1)
// code selectors
#define CS_32 0x23
#define CS_64 0x33
@Cr4sh
Cr4sh / WoW64_call.cpp
Created May 22, 2014 19:33
WoW64 Heaven's Gate
#include "stdafx.h"
#define DB(_val_) __asm __emit (_val_)
#define INVALID_SYSCALL (DWORD)(-1)
// code selectors
#define CS_32 0x23
#define CS_64 0x33
void TestCopy()
{
BOOL cond = FALSE;
IFileOperation *FileOperation1 = NULL;
IShellItem *isrc = NULL, *idst = NULL;
BIND_OPTS3 bop;
SHELLEXECUTEINFOW shexec;
HRESULT r;
do {
@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active May 22, 2024 02:24
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
void TestCopy()
{
BOOL cond = FALSE;
IFileOperation *FileOperation1 = NULL;
IShellItem *isrc = NULL, *idst = NULL;
BIND_OPTS3 bop;
SHELLEXECUTEINFOW shexec;
HRESULT r;
do {
@SkyN9ne
SkyN9ne / UAC-TokenMagic.ps1
Created May 22, 2024 02:21 — forked from Cr4sh/UAC-TokenMagic.ps1
UAC Token Magic
function UAC-TokenMagic {
<#
.SYNOPSIS
Based on James Forshaw's three part post on UAC, linked below, and possibly a technique
used by the CIA!
Essentially we duplicate the token of an elevated process, lower it's mandatory
integrity level, use it to create a new restricted token, impersonate it and
use the Secondary Logon service to spawn a new process with High IL. Like
playing hide-and-go-seek with tokens! ;))
@Cr4sh
Cr4sh / UAC-TokenMagic.ps1
Created August 14, 2019 23:41
UAC Token Magic
function UAC-TokenMagic {
<#
.SYNOPSIS
Based on James Forshaw's three part post on UAC, linked below, and possibly a technique
used by the CIA!
Essentially we duplicate the token of an elevated process, lower it's mandatory
integrity level, use it to create a new restricted token, impersonate it and
use the Secondary Logon service to spawn a new process with High IL. Like
playing hide-and-go-seek with tokens! ;))
@calebrob6
calebrob6 / sam_inference.py
Last active May 22, 2024 02:20
Runs inference on large satellite image scenes with SAM models
# Requires the `segment-geospatial` package https://samgeo.gishub.org/
import argparse
import os
import cv2
import numpy as np
import rasterio
import rasterio.features
import rasterio.transform
import rasterio.windows
@rphlmr
rphlmr / clear-db.ts
Last active May 22, 2024 02:20
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';
`;