Skip to content

Instantly share code, notes, and snippets.

@Treeki
Treeki / lzma_sample.cpp
Created May 24, 2017 21:52
simple LZMA SDK compression/decompression example
// note: -D_7ZIP_ST is required when compiling on non-Windows platforms
// g++ -o lzma_sample -std=c++14 -D_7ZIP_ST lzma_sample.cpp LzmaDec.c LzmaEnc.c LzFind.c
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <memory>
#include "LzmaEnc.h"
#include "LzmaDec.h"
@gjbagrowski
gjbagrowski / .env-example
Created January 23, 2017 13:09
Django-environ example
# project-repo/app/settings/.env-example
#
# DJANGO
#
SITE_HOST=localhost:8000
USE_SSL=False
ALLOWED_HOSTS=localhost,127.0.0.1
SECRET_KEY=asdasd
DEBUG=true # never on production, will cause settings including api keys to leak
DJANGO_LOG_LEVEL=DEBUG
@ascendbruce
ascendbruce / README.md
Last active June 12, 2024 18:39
Use macOS-style shortcuts in Windows

Use macOS-style shortcuts in Windows / keyboard mappings using a Mac keyboard on Windows

ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows

Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)

With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.

How does it work

@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active June 6, 2024 15:53
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.