Skip to content

Instantly share code, notes, and snippets.

View icy's full-sized avatar
🦖
Available

Ky-Anh Huynh icy

🦖
Available
View GitHub Profile
@icy
icy / Screenshot_2020-12-19_13-37-41.png
Last active December 24, 2020 13:06
my-crazy-xorg.txt
Screenshot_2020-12-19_13-37-41.png
@icy
icy / wait_for_es.sh
Last active November 26, 2020 11:21
wait-for-es
```
# Purpose : Wait until es is green
# Author : Ky-Anh Huynh
# License : Public domain
#
# Usage example
#
# RETRIES=10 wait_for_es http://hostname:port
#
wait_for_es() {
https://github.com/icy/kustomize-misc/tree/master/2995
```
$ diff <(ryaml < current.yaml) <(ryaml < current-test.yaml )
26a27,28
> nodeSelector:
> mine/group: my_worker_group
37,38d38
< nodeSelector:
< mine/group: my_worker_group
@icy
icy / sops_secure_encryption.md
Last active July 16, 2020 20:24
sops_secure_encryption.sh
@icy
icy / git-crypt-rm-gpg-user.sh
Created May 11, 2020 18:11 — forked from thomsh/git-crypt-rm-gpg-user.sh
Allow you to rotate your git-crypt key and re-encrypt your repository after removing GPG user (Safer version)
#!/usr/bin/env bash
#
# Script to remove GPG user (recipient) with git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
#!/bin/bash
# Unlock the directory, we need the unencrypted versions of the files
git crypt unlock
# Re-initialize git crypt, generating a new key
rm .git/git-crypt/keys/default
git crypt init
# Make the key available to the current users
@icy
icy / gigacube-reboot.rb
Created May 2, 2020 16:40
gigacube-reboot.rb
#!/usr/bin/env ruby
# Author : Ky-Anh Huynh
# License : MIT
# Date : 2020-05-02
# Usage :
#
# $ gem install watir headless
# $ pacman -s xvfb
# $ PASSWORD="your_router_password" ./restart.rb
@icy
icy / improved-fetch.sh
Created April 13, 2020 06:34 — forked from hanophora/improved-fetch.sh
Improved generated script for google-group-crawler
#!/usr/bin/env bash
UA="Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0"
COOKIES="cookies-google-com.txt"
_URLS_PER_PROC=20
_MAX_PROCS=6
_METER_WIDTH=50
queue=0
@icy
icy / my-dns-resolver.rb
Last active March 22, 2020 15:39
my-dns-resolver.rb
#!/usr/bin/env ruby
# Purpose : Extremely stupid dns resolver for laptop
# Author : Ky-Anh Huynh
# License : MIT
# Requirements
#
# * dnscrypt-proxy, or another upstream listen on 127.0.0.1:52
# * NetworkManager
@icy
icy / Makefile-vs-Bash.sh
Last active March 13, 2020 06:50
Makefile-vs-Bash.sh
## Makefile
.PHONY: default
default:
@echo This is default
.PHONY: tests
tests:
@echo We have tests. All tests passed.