Skip to content

Instantly share code, notes, and snippets.

View adamzaninovich's full-sized avatar

Adam Zaninovich adamzaninovich

View GitHub Profile
@adamzaninovich
adamzaninovich / README.md
Last active August 14, 2021 19:24
chkube is a bash function that manages multiple kubectl configs using symlinks

chkube bash function

chkube is a bash function that manages multiple kubectl configs using symlinks

Setup

  • copy this function to your bashrc aliases or functions file
  • put all configs in ~/.kube/ with names like my-config.yaml (they must end in .yaml)
  • symlink one of them to ~/.kube/config
  • use chkube to manage them after that
@adamzaninovich
adamzaninovich / gg_cleanup notes.md
Last active July 28, 2021 19:57
Git branch cleanup

Notes

This is not a script. You will want to just add these functions to your bash config (or make it into a script, do what you want, I'm not your mom)

You can remove all the other functions if you want to just replace ohai and error with echo for simplicity (I just have those formatting functions at the top of my alias/function file in my bash config and use them in a lot of my functions. They are originally from the homebrew sourcecode)

New Features

  • exit if not in git repo
  • support a main branch other than master (useful if you are using main or if you use something like gitflow and want to compare to develop, staging, etc
@adamzaninovich
adamzaninovich / alacritty.yml
Last active March 12, 2021 23:07
Adam's Alacritty Config with Nord theme
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@adamzaninovich
adamzaninovich / starship.toml
Last active March 13, 2021 01:13
Adam's Starship Prompt Config
# Adam's Starship Config
#
# Docs: https://starship.rs/config
# font: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip
# icon reference: https://www.nerdfonts.com/cheat-sheet (use copy icon)
# Don't print a new line at the start of the prompt
add_newline = false
[character]
@adamzaninovich
adamzaninovich / encrypted-arch.md
Created August 28, 2020 06:47
Install notes for Arch Linux with full disk encryption

Install Arch Linux with full disk encryption

Links

Download verify, and boot ISO.

Refer to main [Arch Linux install guide] for more information.

Make sure network is up

defmodule PNG do
defstruct [:length, :width, :height, :bit_depth, :color_type,
:compression_method, :filter_method, :interlace_method,
:crc, :chunks]
def new(len, width, height, bit_depth, color_type, compression_method,
filter_method, interlace_method, crc, chunks) do
%__MODULE__{
length: len,
width: width,
@adamzaninovich
adamzaninovich / reclaimWindows10.ps1
Last active June 11, 2020 10:34 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
defmodule MyApp.Redis do
@moduledoc "State management using redis for persistence"
alias MyApp.Redis.Connection
@doc "Starts the redis conection and registers the process"
def start_link(redis_connection_string \\ "redis://localhost") do
Redix.start_link(redis_connection_string, name: MyApp.Redis.Connection)
end
@doc "Sets a value to a key in redis"
@adamzaninovich
adamzaninovich / material-red-yakyak-theme.css
Last active March 6, 2017 23:57
This is a theme tweak for YakYak
html.material {
--white: #202B31;
--ghostwhite: #2d3d46;
--lightgrey: #28353B;
--altgrey: #2B3E41;
--grey: #303F47;
--darkgrey: #617E8A;
--lightblack: #455a64;
--black: #99B1B7;
--green: #900F3C;