Skip to content

Instantly share code, notes, and snippets.

View dahoba's full-sized avatar

Siritas S dahoba

View GitHub Profile
@dahoba
dahoba / gencerts.sh
Created October 2, 2022 05:09 — forked from ryankurte/gencerts.sh
Node.js Client Certificate Validation with Pinning Example
#!/bin/bash
# https://gist.github.com/ryankurte/bc0d8cff6e73a6bb1950
set -e
if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]; then
echo "Usage: $0 CA NAME ORG"
echo "CA - name of fake CA"
echo "NAME - name of fake client"
echo "ORG - organisation for both"
@dahoba
dahoba / admin.sql
Created October 1, 2022 15:15 — forked from phil-hildebrand/admin.sql
Handy PostgreSQL Monitoring Scripts
-- turn off paging (less/more)
psql> \pset pager off
/*
Pager usage is off.
*/
-- find an object name by id
SELECT OID, relname
@dahoba
dahoba / README.md
Created February 11, 2022 08:48 — forked from danielepolencic/README.md
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@dahoba
dahoba / edit-metrics-server-deployment.md
Last active February 4, 2022 12:21 — forked from NileshGule/edit-metrics-server-deployment.md
gist to update kuberentes metrics server deployment

deploy metrics server


kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

edit metrics server deployment by adding command

@dahoba
dahoba / simple-git-workflow.md
Created August 27, 2021 05:10 — forked from leesmith/simple-git-workflow.md
Simple Git Workflow For Continuous Delivery

Simple Git Workflow For Continuous Delivery

Workflow guidelines:

  • master branch is always production-ready, deployable, 100% green test suite
  • New development is done on feature branches, with frequent rebasing onto master
  • Clean commit history by preferring to rebase instead of merge (git pull is configured to automatically rebase)

rebase workflow

Workflow

@dahoba
dahoba / encrypted-git-repo.md
Created December 15, 2020 16:25 — forked from polonskiy/encrypted-git-repo.md
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang ([email protected]). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@dahoba
dahoba / thai-id-card.go
Last active August 15, 2019 07:42 — forked from bouroo/thai-id-card.go
Thai National ID Card reader in GO
package main
// Require pcscd, libpcsclite
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"os"
"strconv"
@dahoba
dahoba / postgres-cheatsheet.md
Created August 9, 2017 03:31 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@dahoba
dahoba / LICENSE
Created December 22, 2016 09:10 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: