Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Postrediori / TwitterHashflags.md
Last active December 20, 2022 11:29
Scan Twitter hashflags

Enumerate and grab hashflags from Twitter

Scripts by @cybertool

Grab hashflag config with expiration dates

File https://pbs\.twimg.com/hashflag/config-yyyy-mm-dd-hh.json contains JSON with hashes and their expiration dates in UNIX epoch format

ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0"
@Postrediori
Postrediori / MSVisualStudioOffline.md
Last active January 6, 2022 11:13
Creating offline cache for MS Visual Studio

Create a local install cache

For C++ desktop development, run:

vs_community.exe --layout C:\VS2022Cache --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US

For .NET desktop development, run:

ImageMagick HowTo

Resize and crop image

convert input.jpg -resize 100x100^ \
                  -gravity Center  \
                  -crop 100x100+0+0 +repage  \
        output.jpg
@Postrediori
Postrediori / ZshGitStatus.md
Created May 18, 2022 12:47
Show Git status in zsh prompt

Add the following config to .zshrc:

# Load colors
autoload -U colors && colors

# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
@Postrediori
Postrediori / PythonEmbeddable.md
Last active March 4, 2026 08:52
Configure Python Embeddable package for Windows

Python Embeddable

Introduction

This article describes how to add pip, install custom modules and use an interpreter form the embeddable package via batch files.

Download Python Embeddable

@Postrediori
Postrediori / WinHandles.hpp
Last active November 7, 2025 08:50
Windows.h replacement for headers by Sebastian Aaltonen (https://twitter.com/SebAaltonen/status/1530152876655386624)
#ifndef __F_WINHANDLES_HPP__
#define __F_WINHANDLES_HPP__
typedef void* HANDLE;
typedef unsigned long long WPARAM;
typedef long long LPARAM;
typedef long long LRESULT;
#define FORWARD_DECLARE_HANDLE(name) struct name##__; typedef struct name##__ *name;
FORWARD_DECLARE_HANDLE(HINSTANCE);
@Postrediori
Postrediori / Upgrade-DigitalOcean-Ubuntu-Droplet-LTS.md
Last active March 9, 2025 19:56
Upgrade DigitalOcean Ubuntu Droplet to the Next LTS Version

Description

The instructions here cover upgrading Ubuntu droplet from one LTS release to the next one. This was used to incrementally upgrade from Ubutnu 16.04 to 20.04 via 18.04.

Instructions

Perform standard update

@Postrediori
Postrediori / Build-ares-emu-on-Fedora.md
Last active May 21, 2024 20:08
Build ares emulator (https://ares-emu.net/) from a source code on a RedHat-based system (including Fedora and CentOS)

Introduction

This document describes hot to build ares emulator from a source code on a Fedora system. This build uses GTK3 as this is the default version available in modern Fedora systems.

ares is a multi-system emulator that is a descendent of higan and bsnes, and focuses on accuracy and preservation.

@Postrediori
Postrediori / GIMP2-loading-fonts.md
Last active July 17, 2023 16:09
Workaround for GIMP2 long font loading during startup

Workaround for GIMP2 long font loading during startup

Navigate to %localappdata%\fontconfig\cache

Sort the files by date and check the most recent ones. There should be:

  • some-long-hash (usually 1MB or more)
  • some-long-hash.NEW (usually 1MB or more, slightly bigger that the one above if you added fonts)

Rename someverylongname to someverylongname.OLD