Skip to content

Instantly share code, notes, and snippets.

View Levvy055's full-sized avatar
🏠
Working from home

Lucas Levvy Levvy055

🏠
Working from home
View GitHub Profile
@zero5100
zero5100 / create-docker-tls.sh
Created March 1, 2018 00:57 — forked from mac2000/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# At the end you will have 6 files:
# ca/ca.pem - used by both client and server to verify each other certificates
# ca/ca-key.pem - keep it in secret it may be used to generate new certificates
# client/cert.pem, client/key.pem - in conjunction with /ca/ca.pem will be used by client to speak with server
# server/cert.pem, server/key.pem - in conjunction with /ca/ca.pem will be used by server
#
# NOTICE: DO NOT FORGET to set your **Server** ip and dns in server/openssl.cnf each time you generating new server certificates
#
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active May 12, 2025 10:36
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

@Levvy055
Levvy055 / SSL certificate creation.md
Last active December 21, 2019 14:11
Creates personal CA with root certificate to make certificates for many sites.

Creation of SSL myCAroot signed Certificates

Creation of root CA:

Only do it one time. Root Certificate will be used in creation of other certificates for your sites.

  1. Create private key:

    openssl genrsa -des3 -out myCA.key 2048

@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@meseta
meseta / buffer_compress_gzip.gml
Last active March 16, 2025 21:35
GML gzip compression, making use of the built-in deflate compression with buffer_compress
/** Compresses a buffer using gzip (deflate)
* @param {Id.Buffer} _buffer The buffer to compress
* @param {Real} _offset the offset in buffer to start compressing
* @param {Real} _size the number of bytes to compress
* @return {ID.Buffer}
*/
function buffer_compress_gzip(_buffer, _offset, _size) {
// Pre-calculated CRC table
static _crc_table = undefined;
if (is_undefined(_crc_table)) {