Skip to content

Instantly share code, notes, and snippets.

@qs-wang
qs-wang / get-argocd-default-password.md
Created September 10, 2024 01:24 — forked from iambryancs/get-argocd-default-password.md
Get ArgoCD default admin password

Get ArgoCD default admin password

To get ArgoCD default admin password after installation, run:

kubectl -n argocd get secret argocd-initial-admin-secret \
          -o jsonpath="{.data.password}" | base64 -d; echo

The default admin user is admin.

@qs-wang
qs-wang / gh-cleanup-releases-tags.sh
Created August 6, 2023 13:39 — forked from joejordanbrown/gh-cleanup-releases-tags.sh
GitHub Cli - Delete all releases and tags in repo.
#! /bin/sh
for num in `gh release list 2>/dev/null | awk '{print $1}'`; do
gh release delete $num -y
done
for num in `gh api repos/:owner/:repo/tags | jq -r '.[].name'`; do
gh api repos/:owner/:repo/git/refs/tags/${num} -X DELETE
echo '✓ Deleted tag' $num
done
@qs-wang
qs-wang / generate_key.sh
Created November 8, 2022 23:21 — forked from cevaris/generate_key.sh
Sign and Verify using Python pycrypto
#!/usr/bin/env bash
# Generate RSA private key
openssl genrsa -out private_key.pem 1024
@qs-wang
qs-wang / auth-hook.js
Created February 19, 2022 11:22 — forked from ulises-jeremias/auth-hook.js
Examples of hooks utils using axios, recoil.js, keycloak-js, @react-keycloak/web and more.
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { useKeycloak } from '@react-keycloak/web';
import { commonNotification } from './common';
/**
* Returns the auth info and some auth strategies.
*
*/
@qs-wang
qs-wang / References
Created January 10, 2022 03:45 — forked from jpcaparas/References
Limit docker CPU and memory resource usage
Inspired by: https://stackoverflow.com/questions/46408673/docker-17-06-ce-default-container-memory-limit-on-shared-host-resources/46557336#46557336
@qs-wang
qs-wang / git-remove-branches
Created June 25, 2020 14:34 — forked from TBonnin/git-remove-branches
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@qs-wang
qs-wang / iterm2.md
Created April 19, 2020 12:27 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@qs-wang
qs-wang / docker-cheat-sheat.md
Created January 3, 2020 02:39 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@qs-wang
qs-wang / curl.md
Created July 31, 2019 00:06 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@qs-wang
qs-wang / kubectl-shortcuts.sh
Created October 18, 2018 23:32 — forked from tamas-molnar/kubectl-shortcuts.sh
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'