Skip to content

Instantly share code, notes, and snippets.

@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:

@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 / images_to_video.py
Created September 15, 2021 06:16
Convert video frames to video
#
# Convert images to video
#
# Example:
# python video.py -i 8012 -l 8151 -f 30 -t 800x600/IMG_%FRAME_NUM%_result.jpg
#
# ffmpeg command line from: https://github.com/justin-bennington/somewhere-ml/blob/main/S2_GAN_Art_Generator_(VQGAN%2C_CLIP%2C_Guided_Diffusion).ipynb
#
from PIL import Image
@Postrediori
Postrediori / Linux-RocketLake-UHD-750.md
Last active June 17, 2023 13:18
Setup UHD 750 GPU on Intel Rocket Lake processors on Linux

Description

Linux distros don't support newest (May 2021) Rocket Lake GPUs by default. Tested on:

  • Fedora 34
  • Ubuntu 20.04.2.0
  • Ubuntu 21.04

Even if i915 module is loaded (lsmod | grep i915), the graphics is still running in software mode. This issue can be checked in the following ways:

@Postrediori
Postrediori / Linux-EDUP-Wireless.md
Last active May 29, 2021 10:37
Linux setup for EDUP 802.11AC 1200M Dual Band USB wireless adapter

Description

New EDUP 802.11AC 1200M Dual Band USB wireless adapter does not work in Linux distributions by default. At least the following distributions lack the required kernel module:

  • Ubuntu 20.04
  • Ubuntu 21.04
  • Fedora 34

Solution

Manually build rtl88x2bu module from sources at cilynx/rtl88x2bu

/*
libbase : version 0.09 ~byuu (2007-01-24)
*/
#ifndef __LIBBASE
#define __LIBBASE
#if defined(_MSC_VER)
//disable libc deprecation warnings in MSVC 2k5+
#pragma warning(disable:4996)
@Postrediori
Postrediori / Interactive-Graphics.md
Last active December 31, 2023 09:13
Online Resources With Generative and Interactive Graphics

Introduction

THis is a list of interactive coding tools online.

GLSL-based interactive tools

Shadertoy

Launch Win32 executables on ARM host with QEMU and Wine

Introduction

This is guide describes the way to run Win32 executable files on ARM host (e.g. tablet) with Ubuntu 18.04 (16.04, 20.04 etc).

Outline

  1. Build static qemu-user-i386 on ARM host
  2. Type magic strings for Win32 executable file format in binfmts
@Postrediori
Postrediori / rotate-video.sh
Last active December 28, 2019 16:56
Script for downloading a video with orbits of Jupiter&asteroids and fixing rotation on Jupiter
#!/bin/bash
#
# Download Jupiter/asteroids video and fix Jupiter's rotation
#
# Tweet address with source video:
# https://mobile.twitter.com/AntonioParis/status/994224252961386496
#
# Required utils:
# * curl
# * convert