Skip to content

Instantly share code, notes, and snippets.

View noizo's full-sized avatar

Ivan Nikolaev noizo

  • 18:01 (UTC +01:00)
View GitHub Profile
@noizo
noizo / as.sh
Last active March 8, 2024 14:51
awsume wrapper with console-plugin and multicontainer firefox profiles + eks function to select a cluster and a namespace
as() {
# awsume wrapper function
# pip install awsume
# pip install awsume-console-plugin
# https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
# https://addons.mozilla.org/en-US/firefox/addon/open-url-in-container/
# curl -sL https://raw.githubusercontent.com/honsiorovskyi/open-url-in-container/master/bin/launcher.sh | sudo tee ~/.local/bin/firefox-container > /dev/null
# chmod +x ~/.local/bin/firefox-container
#
# .awsume/config.yaml
@noizo
noizo / renew_aws_key.sh
Last active March 8, 2024 15:02
Refresh your aws secret key
function renew_aws_key() {
# If no arguments are passed, print usage and exit with error
[ -z "$1" ] && echo "Usage: renew_aws_key <user_name> <profile>" && return 1
# Assign variables for user name and profile name
local user_name="$1"
local profile_name="${2:-default}"
# List the access keys for the specified user
local keys=$(aws iam list-access-keys --user-name "$user_name" --output json)
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@noizo
noizo / change-codec.md
Created October 18, 2021 15:19 — forked from dvf/change-codec.md
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@noizo
noizo / list.txt
Created August 23, 2019 10:49 — forked from shortjared/list.txt
List of AWS Service Principals
acm.amazonaws.com
alexa-appkit.amazon.com
apigateway.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
appsync.amazonaws.com
athena.amazonaws.com
autoscaling.amazonaws.com
batch.amazonaws.com
channels.lex.amazonaws.com
@noizo
noizo / i3lock.sh
Created March 20, 2019 09:45 — forked from nickrw/i3lock.sh
i3 screen lock
#!/bin/bash
# depends: scrot imagemagick keychain rivalctl
# Take a screenshot
scrot /tmp/lockshot.png
# Apply pixellation effect
convert /tmp/lockshot.png -scale 5% -scale 2000% /tmp/lockshot-pixel.png

Keybase proof

I hereby claim:

  • I am noizo on github.
  • I am noizo (https://keybase.io/noizo) on keybase.
  • I have a public key whose fingerprint is 2274 8313 18ED C2EC EE84 F93F 6204 2877 3A3C 098B

To claim this, I am signing this object: