Skip to content

Instantly share code, notes, and snippets.

View vukasin-nikodijevic's full-sized avatar

Vukasin Nikodijevic vukasin-nikodijevic

View GitHub Profile
@vukasin-nikodijevic
vukasin-nikodijevic / aps.bash
Created April 21, 2020 17:34
AWS CLI Profile Switcher
function aws_profile_list {
cat ~/.aws/credentials| grep "\[" | sed 's/\(^.\)\(.*\)\(.$\)/\2/gi'
}
function aws_profile_switch {
selected="${1}"
if [[ -z $(aws_profile_list | grep "${selected}") ]]; then
echo "Selected profile [${selected}] doesn't exists."
return
@vukasin-nikodijevic
vukasin-nikodijevic / alert.sh
Created January 6, 2020 14:46 — forked from cherti/alert.sh
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@vukasin-nikodijevic
vukasin-nikodijevic / note.md
Last active September 16, 2019 07:33
Enter container's namespace from the worker node

Login into worker node by inspecting pod

$ export WORKER_NODE_IP=$(k describe po <pod_name> | grep "^Node:" | cut -f '2' -d '/')
$ ssh "${WORKER_NODE_IP}"

on the worker node

$ export PROCESS_PID=$(docker inspect --format '{{ .State.Pid }}' )

Environment

All of the actions are executed against minikube.

Use case

  • Configmap should be deployed as 1-st
  • Secret should be deployed as 2-nd
  • Docker reg secret should be deployed as 3-nd
find . -maxdepth 1 \
  -not -path . \
  -not -path './.*' \
  -not -path './test' \
  -not -path './yarn*' \
  -not -path './package.json' \
  -not -path './output' \
  -not -path '*.md' \
 -exec tar czf output/archive.tgz --exclude='**/example-input/*' {} +
@vukasin-nikodijevic
vukasin-nikodijevic / sassc+cra+live-reload+package.json
Last active May 23, 2019 09:14
SassC + live rebuild for create-react-app
.
.
.
.
"scripts": {
"start": "npm run build-css & npm run watch-scss & npm run start:dev-server",
"start:dev-server": "NODE_PATH=src react-scripts start",
"build": "NODE_PATH=src react-scripts build",
"test": "NODE_PATH=src react-scripts test --env=jsdom",
"build-css": "sassc -I ./src ./src/index.scss ./src/index.css",
@vukasin-nikodijevic
vukasin-nikodijevic / relocation.md
Last active May 25, 2018 09:18
Relocation setup in Germany in general
@vukasin-nikodijevic
vukasin-nikodijevic / mattermost_custom_theme.md
Created September 20, 2017 07:29
Mattermost custom dark theme

Import as SLACK Theme:

#2e3136,#FFFFFF,#282b30,#FFFFFF,#FFFFFF,#6272A4,#44475A,#8BE9FD,#50FA7B,#E0B333,#FF5555,#ffffff,#ffffff,#333333,#F80,#fff2bb,#2389d7,#2f81b7,#26a970,#ffffff,github