Skip to content

Instantly share code, notes, and snippets.

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

Adam Kaminski thimslugga

🏠
Working from home
View GitHub Profile
@thimslugga
thimslugga / sec_context.py
Created March 27, 2025 06:11 — forked from pudquick/sec_context.py
Check Security context flags
from ctypes import CDLL, byref, c_uint32
Security = CDLL('/System/Library/Frameworks/Security.framework/Versions/Current/Security')
kcallerSecuritySession = c_uint32(-1)
my_session = c_uint32(0)
session_bits = c_uint32(0)
result = Security.SessionGetInfo(kcallerSecuritySession, byref(my_session), byref(session_bits))
flags = session_bits.value
#!/bin/bash
VER="0.94.2";
SCRIPTTITLE="PV - HVM - version $VER";
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
# Configure logging
tmp="/tmp"
logfile="$tmp/$(basename $0).$$.log"
AWSTemplateFormatVersion: '2010-09-09'
Description: Extreme Performance Tuning Benchmark Environment
Parameters:
AmiId:
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'
@thimslugga
thimslugga / Containerfile
Last active April 5, 2025 02:46 — forked from toriato/!README.md
Podman Quadlet Example
FROM php:8.2-fpm-alpine
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN \
chmod +x /usr/local/bin/install-php-extensions \
&& install-php-extensions \
apcu bcmath bz2 ldap pdo_mysql pdo_pgsql exif sysvsem smbclient intl imap pcntl soap imagick gmp gd zip
@thimslugga
thimslugga / pythonenvs.md
Created December 12, 2024 00:28 — forked from ziritrion/pythonenvs.md
Python package managers and environments

uv

Experimental but very promising pip replacement that handles package managing as well as virtual environments and Python version management.

uv comes included with uvx, an alias for uv tool run. uvx allos you to install and execute command-line tools on an ephemeral environment.

Python versions

Note that you don't have to actively install a Python version! uv will automatically fetch the required Python version for your project.

@thimslugga
thimslugga / setup-pypi-mirror.md
Last active December 6, 2024 23:15 — forked from aschmu/pypi-mirror.md
Setup a PyPi Mirror

Setup PyPi Mirror

This guide describes how to create a local PyPI mirror for use in isolated networks without internet access. We'll use bandersnatch to dump packages, a web server to serve them, and devpi to enable search functionality.

This is possible using devpi, web server, bandersnatch and volume to store the packages.

  • Dump all pypi packages with bandersnatch,
  • Serve them for install via web server
  • Enable the search feature by mirroring the web server using devpi.
@thimslugga
thimslugga / emporia-vue-v3.yaml
Created November 11, 2024 12:54 — forked from bradsjm/emporia-vue-v3.yaml
Emporia VUE V3 ESPHome Configuration
substitutions:
name: emporia-vue-v3
friendly_name: Emporia Vue V3
area: "Garage"
# Circuit Labels used for publishing to Home Assistant
circuit_1: "Dryer" #"Circuit 1"
circuit_2: "AC Blower/Heat" #"Circuit 2"
circuit_3: "AC Condenser" #"Circuit 3"
circuit_4: "Water Heater" #"Circuit 4"
@thimslugga
thimslugga / init.vim
Created October 20, 2024 20:46 — forked from onixus74/init.vim
vim-like-vscode
" VIM-VSCODE
"*****************************************************************************
" VIM-PLUG CORE
"*****************************************************************************
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "elixir,eelixir,html,javascript,typescript,python,ruby,yaml"
let g:vim_bootstrap_editor = "nvim" " nvim or vim
@thimslugga
thimslugga / .bash_aliases
Created August 9, 2024 17:32 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@thimslugga
thimslugga / modify_screensharing.sh
Created July 24, 2024 10:20 — forked from timsutton/modify_screensharing.sh
Enabling screen sharing on macOS Monterey as of 12.1 beta 2
#!/bin/bash
# A cleaner alternative to this approach, but which requires a restart, is to populate TCC's SiteOverrides.plist inside
# the TCC app support directory with the following:
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
# <key>Services</key>
# <dict>