Skip to content

Instantly share code, notes, and snippets.

View squirrel532's full-sized avatar

Squirrel squirrel532

View GitHub Profile
@slawekzachcial
slawekzachcial / self-signed-certificate-with-custom-ca-and-kms.md
Last active April 11, 2024 16:44
Self Signed Certificates with Custom Root CA and Root CA Key Encrypted with AWS KMS

This Gist is based on Self Signed Certificate with Custom Root CA gist.

It adds the use of AWS KMS to generate and decrypt the Root CA private key, so that this key does not need to be stored in plaintext. Instead, the key is stored encrypted, and is being decrypted using AWS KMS only when needed.

Create AWS KMS CMK - Done Once

Create symmetic CMK (customer-managed key) and give it an alias of alias/root-ca-encrypting-key that will be used later to reference to it:

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@datagrok
datagrok / README.md
Last active June 6, 2021 14:23
Circular imports in Python 2 and Python 3: when are they fatal? When do they work?
@danackerson
danackerson / 100_base.conf
Last active October 20, 2023 10:11
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@dannvix
dannvix / dmhy-magdl.py
Last active March 19, 2018 14:59
Command-line downloader (via magnet link) for share.dmhy.org
#!/usr/bin/env python
# encoding: utf-8
# dmhy-magdl.py -- command-downloader for share.dmhy.org
import sys
import urllib
import urllib2
from datetime import datetime, timedelta
import webbrowser
import xml.etree.ElementTree as ElementTree
@reecer
reecer / General Makefile
Last active November 28, 2022 19:28
A general makefile for general-purpose C projects.
CC=gcc
CCFLAGS=-Wall
LDFLAGS=
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
TARGET=des
all: $(TARGET)
$(TARGET): $(OBJECTS)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 17:58
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname