Skip to content

Instantly share code, notes, and snippets.

View mjstephan's full-sized avatar

Michael Stephan mjstephan

View GitHub Profile
@mjstephan
mjstephan / lua_build_macos.sh
Created April 28, 2025 14:24 — forked from zirkuswurstikus/lua_build_macos.sh
A step by step guide on how to install lua, luajit and luarocks from sources on macOS.
# Build & install Lua on macOS
# We will compile Lua 5.1 because it is compatible with openresty/lapis.
# Replace the variables from line 30 ff to install a diffrent version.
# See: https://www.lua.org/manual/5.1/
# NOTE:
# We create a dedicated directory for the Lua stuff to putt all the stuff in.
@mjstephan
mjstephan / proxmox.md
Created July 8, 2024 02:46 — forked from scyto/proxmox.md
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@mjstephan
mjstephan / ios-font-sizes.swift
Created August 25, 2021 14:51 — forked from zacwest/ios-font-sizes.swift
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
for style in styles {
@mjstephan
mjstephan / ContentView.swift
Created August 5, 2021 21:02 — forked from pd95/ContentView.swift
InstaFilter main logic for CoreImage filter application
//
// ContentView.swift
// Project13
//
// Created by Paul Hudson on 17/02/2020.
// Copyright © 2020 Paul Hudson. All rights reserved.
//
import CoreImage
import CoreImage.CIFilterBuiltins
@mjstephan
mjstephan / nginx-tuning.md
Created October 12, 2020 03:01 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@mjstephan
mjstephan / HOWTODMG.md
Created September 1, 2020 17:44 — forked from jadeatucker/HOWTODMG.md
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@mjstephan
mjstephan / fcgi.py
Created September 20, 2018 19:56 — forked from antoinemartin/fcgi.py
Django management command to run Django on Windows with IIS through FastCGI
# encoding: utf-8
# FastCGI-to-WSGI bridge for files/pipes transport (not socket)
#
# Copyright (c) 2002, 2003, 2005, 2006 Allan Saddi <[email protected]>
# Copyright (c) 2011 Ruslan Keba <[email protected]>
# Copyright (c) 2012 Antoine Martin <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without