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 / 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>
@thimslugga
thimslugga / README.md
Created April 24, 2024 17:28 — forked from YOU54F/README.md
Apple Silicon and Virtual Machines: Beating the 2 VM Limit
@thimslugga
thimslugga / bash_clean_code.sh
Created March 4, 2024 01:27 — forked from polyakovin/bash_clean_code.sh
Clean code example using Bash language
#!/bin/bash
function process_script_request {
if [[ $# -eq 0 ]]; then
show_help
else
case $1 in
help) show_help;;
back) serve_backend;;
back:prod) serve_backend_production;;
front) update_and_watch_assets;;
@thimslugga
thimslugga / gist:c0532d8e0475b8c9a636aa41969376a3
Created January 16, 2024 18:46 — forked from rcaetano/gist:5999184
Configure Amazon Linux EC2

Steps

  • Build tools:

      sudo yum groupinstall "Development Tools"
      sudo yum install openssl openssl-devel
      sudo yum install git-core
    
  • Dependencies: