Skip to content

Instantly share code, notes, and snippets.

View jorbecalona's full-sized avatar

Jonathan Poczatek jorbecalona

View GitHub Profile
@pydevops
pydevops / gke-gce-cloud-armor-lb.sh
Created December 7, 2021 23:42 — forked from mikesparr/gke-gce-cloud-armor-lb.sh
Example Cloud Armor policies protecting Google HTTPS Global Load Balancer in front of GCE instance group and GKE cluster
#!/usr/bin/env bash
# REF: https://cloud.google.com/armor/docs/integrating-cloud-armor#with_ingress
# REF: https://cloud.google.com/armor/docs/configure-security-policies
# REF: https://cloud.google.com/iap/docs/load-balancer-howto
# REF: https://cloud.google.com/sdk/gcloud/reference/compute/url-maps/add-path-matcher
# REF: https://cloud.google.com/load-balancing/docs/https/setting-up-url-rewrite
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_USER=$(gcloud config get-value core/account) # set current user
@dragonsinth
dragonsinth / gcp-kube.go
Last active May 5, 2024 13:22
Connect to Google Kubernetes with GCP credentials and pure Golang
package main
import (
"context"
"encoding/base64"
"flag"
"fmt"
"log"
container "google.golang.org/api/container/v1beta1"
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@timetocode
timetocode / proxy.js
Created December 20, 2016 07:48
A node-based proxy server example. Here 8 game servers are listening for websocket connections (ports 8000-8007), a file server that serves the game's assests is listening on 7999, and a small app that creates a list of the servers is running on 8080. Externally all of these services are exposed on port 80 and different urls. /0 through /7 are t…
var http = require('http')
var httpProxy = require('http-proxy')
var servers = {
'/0': 'ws://127.0.0.1:8000',
'/1': 'ws://127.0.0.1:8001',
'/2': 'ws://127.0.0.1:8002',
'/3': 'ws://127.0.0.1:8003',
'/4': 'ws://127.0.0.1:8004',
'/5': 'ws://127.0.0.1:8005',
@danieleggert
danieleggert / GPG and git on macOS.md
Last active May 3, 2024 12:26
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@esromneb
esromneb / g2rref.m
Last active July 21, 2022 12:28
matlab's rref function modified to operate in gf(2)
% This is a modified version of matlab's building rref which calculates
% row-reduced echelon form in gf(2). Useful for linear codes.
% Tolerance was removed because yolo, and because all values
% should only be 0 or 1. @benathon
function [A] = g2rref(A)
%G2RREF Reduced row echelon form in gf(2).
% R = RREF(A) produces the reduced row echelon form of A in gf(2).
%
% Class support for input A:
@alansmithy
alansmithy / .block
Last active April 26, 2019 06:17
Pictogram grid in d3js
license: mit