Skip to content

Instantly share code, notes, and snippets.

View exaucae's full-sized avatar

Chrys Exaucet exaucae

View GitHub Profile
@exaucae
exaucae / kill-process.txt
Last active October 27, 2021 12:50
scripting utils
Windows
=======
1. netstat -ano | findstr < Port Number >
Example: netstat -ano | findstr 8080
2. taskkill /F /PID < Process Id >
Example: taskkill /F /PID 25392
@exaucae
exaucae / k8s-memo
Last active September 15, 2021 14:45
kubernetes special tricks
# add ingress controller with minikube
minikube addons enable ingress
# verify it
kubectl get pods -n ingress-nginx \
-l app.kubernetes.io/name=ingress-nginx --watch
@exaucae
exaucae / .gitmodules-rm.md
Last active November 22, 2021 09:03
average to advanced git commands
  1. Delete the relevant section from the .gitmodules file. 2.Stage the .gitmodules changes: git add .gitmodules
  2. Delete the relevant section from .git/config.
  3. Remove the submodule files from the working tree and index: git rm --cached path_to_submodule (no trailing slash).
  4. Remove the submodule's .git directory: rm -rf .git/modules/path_to_submodule
  5. Commit the changes: git commit -m "Removed submodule "
  6. Delete the now untracked submodule files: rm -rf path_to_submodule

Ref: https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule

@slawekzachcial
slawekzachcial / aws-sigv4-ssm-get-parameter.sh
Last active May 3, 2024 02:51
Using CURL to call AWS ReST API, signing request with v4 signature
#!/bin/bash
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; }
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; }
readonly parameterName="SlawekTestParam"
readonly method="POST"
@subfuzion
subfuzion / curl.md
Last active May 9, 2024 18:17
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.

@soheilhy
soheilhy / nginxproxy.md
Last active May 8, 2024 09:56
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers