Skip to content

Instantly share code, notes, and snippets.

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

Vee xenirio

🏠
Working from home
  • Chiang Mai, Thailand
View GitHub Profile
@sdeoras
sdeoras / vault-auto-unseal-gcp-kms.md
Last active July 11, 2024 14:28
vault auto-unseal using gcp kms

Steps required to setup auto-unseal of vault using GCP KMS on k8s are as follows:

  • Create a keyring and key
  • Generate a service account credentials with encrypter-decryper role
  • Download https://github.com/hashicorp/vault-helm
  • Checkout a particular version (say tags/v0.3.0)
  • Edit values.yaml and update it as shown below.
  • Install helm/tiller and install vault component

diff for values.yaml

@alinetskyi
alinetskyi / setup.sh
Last active March 24, 2023 09:39
Setup Debian machine for docker-compose
#!/bin/bash -x
COMPOSE_VERSION="1.23.2"
COMPOSE_URL="https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)"
# Opendax bootstrap script
install_core() {
sudo bash <<EOS
apt-get update
apt-get remove -y --purge unscd
@zulhfreelancer
zulhfreelancer / gracefully_shutting_down_workers.md
Last active June 11, 2021 03:38
Rails: gracefully shutting down workers - how to fix?

This might coming from Sidekiq. Just run this:

ps -ef | grep sidekiq | grep -v grep | awk '{print $2}' | xargs kill -9

And, restart your rails server again.

@ummahusla
ummahusla / git-overwrite-branch.sh
Last active October 31, 2025 17:15 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@lalibi
lalibi / Set-WindowState.ps1
Last active October 8, 2025 22:13 — forked from Nora-Ballard/Set-WindowState.ps1
Hide, Show, Minimize, Maximize, etc window from Powershell.
function Set-WindowState {
<#
.SYNOPSIS
Set the state of a window.
.DESCRIPTION
Set the state of a window using the `ShowWindowAsync` function from `user32.dll`.
.PARAMETER InputObject
The process object(s) to set the state of. Can be piped from `Get-Process`.
@lfender6445
lfender6445 / gist:9919357
Last active October 8, 2025 09:24
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger