Skip to content

Instantly share code, notes, and snippets.

View tsteinholz's full-sized avatar

тнσмαѕ ѕтєιинσℓz tsteinholz

View GitHub Profile
@dreikanter
dreikanter / encrypt_openssl.md
Last active August 9, 2025 14:38 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

" vim.rc by Thomas Steinholz
" ------------------------------------------------------------------------------
" ViM!
" <Leader> : Space Key
" F2 : Toggle Paste Mode
" F3 : Undo Tree
" F4 : Toggle Spell Check
" F8 : New Tab
" F9 : Previous Tab
" F10 : Next Tab
@dghost
dghost / gist:f80e58e93c1f5a67254e
Last active January 29, 2019 03:45
FindSteamworks.cmake - quick and dirty CMake support for the Steamworks SDK
# Locate Steamworks library
# This module defines
# STEAMWORKS_LIBRARY, the name of the library to link against
# STEAMWORKS_INCLUDE_DIR, the directory containing steam/steam_api.h
# STEAMWORKS_FOUND, if false, do not try to link to Steamworks
#
# If a path is set in the SteamworksDIR environment variable it will check there
#
# This has been tested on OS X
# This may or may not with Linux - it should, but i think it could be broken easily
@adamgreig
adamgreig / 00-README.md
Last active August 12, 2022 08:37
Run embedded Rust code on your STM32F4

Embedded Rust on STM32F4

My notes from implementing Job Vranish's excellent guide.

Follow along with the guide above, getting rustc from rustup or similar:

rustc 1.0.0-nightly (dcaeb6aa2 2015-01-18 11:28:53 +0000)
binary: rustc
commit-hash: dcaeb6aa23ecba2dc2af870668a9239136d20fa3

commit-date: 2015-01-18 11:28:53 +0000

@alexpana
alexpana / FindSDL2.cmake
Last active May 3, 2017 14:40
Getting started with CLion and SDL2 on Windows
# Find the include directory which contains SDL.h
FIND_PATH(SDL2_INCLUDE_DIR SDL.h HINTS $ENV{SDL2} PATH_SUFFIXES include/SDL2)
# Find the library libSDL2.a
FIND_LIBRARY(SDL2_LIBRARY SDL2 HINTS $ENV{SDL2} PATH_SUFFIXES lib)
# Find the library libSDL2main.a
FIND_LIBRARY(SDL2MAIN_LIBRARY SDL2main HINTS $ENV{SDL2} PATH_SUFFIXES lib)
INCLUDE(FindPackageHandleStandardArgs)
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@jcdickinson
jcdickinson / colorblind.glsl
Last active January 14, 2025 11:03
Colorblind Simulation Shader
/*-----------------------------------------------------------.
/ ColorBlind correction /
'-----------------------------------------------------------*/
// Daltonize (source http://www.daltonize.org/search/label/Daltonize)
// Modified to simulate color blindness.
float4 Daltonize( float4 input, float2 tex )
{
// RGB to LMS matrix conversion
float3 L = (17.8824f * input.r) + (43.5161f * input.g) + (4.11935f * input.b);
float3 M = (3.45565f * input.r) + (27.1554f * input.g) + (3.86714f * input.b);
@lirenlin
lirenlin / gist:9892945
Last active September 8, 2025 13:58
i3 wm, hide window title bar
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@dbrockman
dbrockman / degrees-radians.h
Created February 12, 2013 21:52
Convert degrees <-> radians C macros
// Converts degrees to radians.
#define degreesToRadians(angleDegrees) (angleDegrees * M_PI / 180.0)
// Converts radians to degrees.
#define radiansToDegrees(angleRadians) (angleRadians * 180.0 / M_PI)