Skip to content

Instantly share code, notes, and snippets.

View icy's full-sized avatar
🦖
Available

Ky-Anh Huynh icy

🦖
Available
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@icy
icy / btsync-keygen
Created January 10, 2021 09:59 — forked from sciurius/btsync-keygen
Perl script to generate secrets and config data for BTsync
#!/usr/bin/perl -w
# Key generation for BTsync.
# Author : Johan Vromans
# Created On : Sun Apr 27 20:31:57 2014
# Last Modified By: Johan Vromans
# Last Modified On: Fri May 2 15:37:24 2014
# Update Count : 47
# Status : Unknown, Use with caution!
@icy
icy / btsync-secret
Created January 10, 2021 09:58 — forked from anonymous/btsync-secret
btsync-secret - A Bittorrent Sync Secret Generator
#!/bin/sh
#/ Usage: btsync-secret [option]...
#/ A Bittorrent Sync Secret Generator
set -e
h_flag=false
v_flag=false
e_flag=false
n_flag=false
c_flag=false
@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 / 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

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@icy
icy / fluent-filebeat-comparison.md
Created October 15, 2019 15:23 — forked from StevenACoffman/fluent-filebeat-comparison.md
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@icy
icy / index.md
Created October 7, 2019 07:38 — forked from bojand/index.md
gRPC and Load Balancing

Just documenting docs, articles, and discussion related to gRPC and load balancing.

https://github.com/grpc/grpc/blob/master/doc/load-balancing.md

Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.

https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po

gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

// Author : Ky-Anh Huynh
// License: MIT
// Origin : https://gist.github.com/dnozay/e7afcf7a7dd8f73a4e05#file-disk-usage-retention-groovy
jobs = Jenkins.instance.getAllItems()
jobs.each { j ->
if (j instanceof com.cloudbees.hudson.plugins.folder.Folder) { return }
if (j instanceof jenkins.branch.OrganizationFolder) { return }
if (j instanceof org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject) { return }