Skip to content

Instantly share code, notes, and snippets.

View robincher's full-sized avatar

Robin Cher robincher

View GitHub Profile
@mrlesmithjr
mrlesmithjr / logstash.conf
Last active February 19, 2020 08:22
Logstash Configuration File
input {
redis {
host => "127.0.0.1"
data_type => "list"
key => "logstash"
}
}
input {
udp {
type => "syslog"
s = status --short --branch --ignore-submodules=untracked
find = log --pretty=\"format:%Cgreen%H\n%s\n\n%b\" --name-status --grep
amend = commit --amend --no-edit
undo = reset HEAD~
upload = "!git push rakyll $(git rev-parse --abbrev-ref HEAD)"
prune = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
delete = branch -D
pr = "!git fetch origin pull/$1/head:pr$1"
sync = "!git pull -q -r origin master"
@samloh84
samloh84 / .azurerc
Created July 6, 2020 02:57
.azurerc
#!/bin/bash
ARM_TENANT_ID="${ARM_TENANT_ID:-}"
ARM_SUBSCRIPTION_ID="${ARM_SUBSCRIPTION_ID:-}"
ARM_SERVICE_PRINCIPAL_CREDENTIALS_PATH="${HOME}/.azure/terraform_service_principal_credentials.json"
AZURE_LOGGED_IN=0
AZURE_ACCESS_TOKEN=$(az account get-access-token --subscription "${ARM_SUBSCRIPTION_ID}")
@jimangel
jimangel / readme.md
Last active April 17, 2021 14:47
Examples of how to test the impact of the v1.16 API deprecations

Kubernetes v1.16 API deprecation testing

Examples of how to test the impact of the v1.16 API deprecations and ways to debug early!

If this is the first time you're hearing of these deprecations STOP and read this blog post (thanks @vllry!).

Common misunderstandings

  1. The exact apiVersion: value that I use in my manifest is stored on disk (etcd).

Install a 3-Node Kubernetes Cluster on Centos 7

This setup uses 3 machines:

  1. Centos7
  2. 100GB HDD
  3. 32 GB RAM
  4. 8 CPU

All Machines

@nmerouze
nmerouze / main.go
Last active January 17, 2025 21:20
JSON-API with Go and MongoDB: Final Part
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@hguerrero
hguerrero / kong.yml
Created March 13, 2025 15:47
Kong tech enablement for 3.10 demos config
_format_version: "3.0"
_transform: true
services:
- name: request_callout
url: https://echo-api.3scale.net/
routes:
- name: request_callout
hosts:
- callout.dev
@quinnjr
quinnjr / README.md
Last active July 31, 2025 19:03
How to easily add environment variables to an Angular application

How to easily add environment variables to an Angular application

This guide assumes that you already have an angular application set up by ng create and are using Angular CLI for compilation.

Other guides that I've read rely upon re-writing your environments/environment.ts|environment.prod.ts files with each compilation. I find this to be completely unnecessary when angular's internal use of webpack can just be extended to include environment variables.

1. Add @angular-builders/custom-webpack to your dev-dependencies

@gszr
gszr / callout.json
Created August 6, 2025 15:19
Callout body via Lua code
{
"name": "request-callout",
"config": {
"callouts": [
{
"name": "c1",
"request": {
"url": "https://httpbin.org/anything",
"method": "POST",
"body": {
@andrewpetrochenkov
andrewpetrochenkov / mac-squid.sh
Last active August 26, 2025 10:54
squid macos #squid
brew install squid
brew link --force squid
sudo ln -fs /opt/homebrew/opt/squid/sbin/squid /usr/local/bin/squid
sudo ln -fs /opt/homebrew/Cellar/squid/6.11/libexec/security_file_certgen /usr/local/bin/security_file_certgen
find /opt/homebrew -name "security_file_certgen" 2>/dev/null
# /opt/homebrew/Cellar/squid/6.11/libexec/security_file_certgen
sudo mkdir -p /usr/local/etc/squid/ssl_cert