Skip to content

Instantly share code, notes, and snippets.

@madevgeny
madevgeny / generate_self_signed_certification.md
Created October 11, 2025 14:12 — forked from taoyuan/generate_self_signed_certification.md
Generation of a Self Signed Certificate

Generation of a Self Signed Certificate

Generation of a self-signed SSL certificate involves a simple 3-step procedure:

STEP 1: Create the server private key

openssl genrsa -out cert.key 2048

STEP 2: Create the certificate signing request (CSR)

openssl req -new -key cert.key -out cert.csr
@madevgeny
madevgeny / revert_zips.bat
Created October 20, 2024 15:05
revert files by mask
([xml](svn status --xml)).status.target.entry.path | sls ".zip" | %{svn revert $_}
@madevgeny
madevgeny / CMakeLists.txt
Created September 30, 2024 21:08 — forked from Trass3r/CMakeLists.txt
template for OpenGL with CMake, Conan, glad and glfw
cmake_minimum_required(VERSION 3.16)
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "")
project(cppgl)
set(CMAKE_CXX_STANDARD 20)
if (NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
@madevgeny
madevgeny / sdl2_opengl_4_5_triangle.cpp
Created September 29, 2024 18:15 — forked from m1nuz/sdl2_opengl_4_5_triangle.cpp
Miminal C++ SDL2 OpenGL 4.5 example
//
// Miminal C++ SDL2 OpenGL 4.5 example
//
// by Poddubny Michael
//
// Download OpenGL header:
// wget https://www.khronos.org/registry/OpenGL/api/GL/glcorearb.h
//
// Compile:
// g++ -std=c++11 sdl2_opengl_4_5_triangle.cpp -I. -lSDL2 -o sdl2_opengl_4_5_triangle
@madevgeny
madevgeny / opengl3_hello.c
Created September 29, 2024 18:14 — forked from koute/opengl3_hello.c
Minimal SDL2 + OpenGL3 example.
/*
Minimal SDL2 + OpenGL3 example.
Author: https://github.com/koute
This file is in the public domain; you can do whatever you want with it.
In case the concept of public domain doesn't exist in your jurisdiction
you can also use this code under the terms of Creative Commons CC0 license,
either version 1.0 or (at your option) any later version; for details see:
http://creativecommons.org/publicdomain/zero/1.0/
import glob
def search_str(file_path, buf):
with open(file_path, 'rb') as file:
# read all content of a file
content = file.read()
# check if string present in a file
return buf in content
fl = glob.glob('*.fxo')
@madevgeny
madevgeny / GLSL-Noise.md
Created December 11, 2022 20:25 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@madevgeny
madevgeny / WireGuard_Setup.txt
Created October 30, 2022 17:03 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@madevgeny
madevgeny / mount_sshfs.sh
Last active January 15, 2022 18:24
mount_sshfs
#!usr/bin/bash
sshfs -o cache=yes -o kernel_cache -o large_read -o compression=yes -o ciphers=aes256-gcm@openssh.com -o reconnect $1 $2
@madevgeny
madevgeny / config
Created January 3, 2022 20:18 — forked from rbialek/config
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa