Skip to content

Instantly share code, notes, and snippets.

View Aetherinox's full-sized avatar

Aetherinox Aetherinox

View GitHub Profile
@computerquip
computerquip / ut2004-key-gen.py
Last active September 22, 2024 03:25
UT2004 Key Generator Bottle App
from bottle import default_app, route
import hashlib
import ctypes
import secrets
# Copyright (c) 2005-2023, NumPy Developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@sindresorhus
sindresorhus / esm-package.md
Last active September 30, 2024 18:52
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@alexanderadam
alexanderadam / Dockerfile
Created March 11, 2020 12:41 — forked from blacksheep--/Dockerfile
Traefik Catch-All to return HTTP421 for unresolved routes
FROM golang:1.14-alpine
COPY . /go/src/app
WORKDIR /go/src/app
RUN go get -v -d
RUN go install
CMD ["app"]
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active September 27, 2024 13:49
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@ikbelkirasan
ikbelkirasan / host_apt_repo_on_github.md
Last active September 21, 2024 02:30
Host an APT repository on Github

Host an APT repository on Github

This guide will help you host an APT repository on Github.

Prerequisites

You need to install the following packages.

  • reprepro
@elklein96
elklein96 / self_signed_certs.md
Created February 14, 2018 04:32
A quick guide for creating self-signed certificates using OpenSSL

Creating a Self-Signed Certificate

Prerequisites

  • You'll need to install OpenSSL to create and sign certificates.
    • Linux: sudo apt-get install openssl
    • MacOS: brew install openssl

Getting Started

@cskeeters
cskeeters / broadcast_calc.sh
Created December 8, 2016 19:17
Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation
#!/bin/bash
# Calculates network and broadcast based on supplied ip address and netmask
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0
# Usage: broadcast_calc.sh 192.168.0.1/24
tonum() {
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active September 17, 2024 08:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@baywet
baywet / pfxtosnk.cs
Created October 4, 2014 00:39
sample on how to convert a pfx to snk visual studio assembly signing certificate
X509Certificate2 cert = new X509Certificate2(@"KEY.pfx", "pfxPassword", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
RSACryptoServiceProvider provider = (RSACryptoServiceProvider) cert.PrivateKey;
byte[] array = provider.ExportCspBlob(!provider.PublicOnly);
using (FileStream fs = new FileStream("FileName.snk", FileMode.Create, FileAccess.Write))
{
fs.Write(array, 0, array.Length);
}
@dylancwood
dylancwood / tree.css
Last active August 2, 2024 04:06
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;