Skip to content

Instantly share code, notes, and snippets.

View davistran86's full-sized avatar

davistran86

View GitHub Profile
@davistran86
davistran86 / run.tpl
Created April 25, 2023 08:11 — forked from ictus4u/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@davistran86
davistran86 / JSONPath in kubectl CLI.md
Created December 29, 2022 04:08 — forked from noseka1/JSONPath in kubectl CLI.md
JSONPath in kubectl CLI examples

Examples

$ kubectl get pods -o json
$ kubectl get pods -o jsonpath='{@}'
$ kubectl get pods -o jsonpath='{.items[0]}'
$ kubectl get pods -o jsonpath='{.items[0].metadata.name}'
$ kubectl get pods -o jsonpath="{.items[*]['metadata.name', 'status.capacity']}"
$ kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.startTime}{"\n"}{end}'
$ kubectl get pods -o jsonpath='{.items[*].status.podIP}'
@davistran86
davistran86 / Steps_to_Terminal_Enlightenment_on_a_Mac.md
Created October 19, 2022 17:00 — forked from GLMeece/Steps_to_Terminal_Enlightenment_on_a_Mac.md
Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit)
@davistran86
davistran86 / .env
Created September 28, 2022 10:31 — forked from degitgitagitya/.env
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@davistran86
davistran86 / how-to-k3s-ha.md
Created November 22, 2021 07:42 — forked from thebsdbox/how-to-k3s-ha.md
HA K3S with kube-vip

The Architecture

Below is a sample architecture, no workers for this example :-)

  • VIP 192.168.0.40
  • K8S01 192.168.0.41
  • K8S02 192.168.0.42
  • DB01 192.168.0.43

Create our DB on DB01

@davistran86
davistran86 / gitlab-microk8s.md
Created October 12, 2021 15:09 — forked from hardyscc/gitlab-microk8s.md
Gitlab MicroK8s CI/CD Integration

Gitlab MicroK8s CI/CD Integration

Install microk8s

sudo snap install microk8s --classic
sudo microk8s status --wait-ready

Install plugins

import { catchError, map } from 'rxjs/operators';

const response = this.httpService
  .get('https://abc.com/api/v2/branches')
  .pipe(
    map((response) => response.data),
    catchError((e) => {
      throw new HttpException(e.response.data, e.response.status);
 }),

You can search on how to kill that process.

For Linux/Mac OS search (sudo) run this in the terminal:

$ lsof -i tcp:3000
$ kill -9 PID

On Windows:

netstat -ano | findstr :3000
entering command+shift+g in finder activates go to the folder.
enter /Library/Keychains/crls/
delete or rename the "valid.sqilite3" file.