Skip to content

Instantly share code, notes, and snippets.

View ivanstepanovftw's full-sized avatar

ivanstepanovftw

View GitHub Profile
@eevee
eevee / spabs.md
Last active June 22, 2025 22:20
tabs to spaces
@hi2p-perim
hi2p-perim / ssecheck.cpp
Last active January 10, 2025 09:47
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif
# suppose you have created a ui file called configwin.ui
cmake_minimum_required (VERSION 2.6)
project(tst)
find_package(Qt5Widgets)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@andrewrk
andrewrk / 3let.py
Created February 15, 2016 03:27
origin of the zig programming language name. https://github.com/andrewrk/zig/
import string
import random
vowels = "aoeuiy"
def m():
c1 = vowels[random.randint(0,len(vowels)-1)]
c2 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
c3 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
print('z' + c1 + c2 + c3)
m()
@CMCDragonkai
CMCDragonkai / memory_layout.md
Last active June 24, 2025 19:56
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@annikoff
annikoff / blood_and_сoncrete.sh
Last active March 1, 2024 03:00
Blood and Concrete monologue
#!/bin/sh
spd-say "You motherfucker, come on you little ass… fuck with me, eh? You fucking little asshole, dickhead cocksucker…You fuckin' come on, come fuck with me! I'll get your ass, you jerk! Oh, you fuckhead motherfucker! Fuck all you and your family! Come on, you cocksucker, slime bucket, shitface turdball! Come on, you scum sucker, you fucking with me? Come on, you asshole"

For Windows 10, change these keys in regedit:

  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\open\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\edit\command

From: %SystemRoot%\system32\NOTEPAD.EXE %1 To: "%ProgramFiles%\Sublime Text 3\sublime_text.exe" "%1" Or: "%ProgramFiles%{insert-path-to-fave-editor}" "%1"

@t-mat
t-mat / WasapiCapture.cpp
Last active April 29, 2022 10:29
[Win32] Capture WASAPI audio endpoint
// Capture WASAPI audio endpoint
// https://docs.microsoft.com/en-us/windows/desktop/coreaudio/capturing-a-stream
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmdeviceapi.h>
#include <audioclient.h>
#include <Functiondiscoverykeys_devpkey.h> // PKEY_Device_FriendlyName
#include <fcntl.h> // _O_U16TEXT
#include <io.h>
@ivanstepanovftw
ivanstepanovftw / x11vnc_over_hardened_ssh.md
Last active September 6, 2019 21:43
x11vnc over passwordless SSH with Google Authenticator on Arch Linux

x11vnc over passwordless SSH with Google Authenticator on Arch Linux

How auth will look after configuration:

Enter your private key password: 
User: user
< client sends his public key to server, signed by client's private key (correct me if I am wrong) >
2FA code: 123123
user's password: 
import cv2
import numpy as np
def draw_text(
img,
*,
text,
uv_top_left,
color=(255, 255, 255),