Skip to content

Instantly share code, notes, and snippets.

View rbudiharso's full-sized avatar
🤔
hmmm.... I wonder what's this button here do...

Rahmat Budiharso rbudiharso

🤔
hmmm.... I wonder what's this button here do...
View GitHub Profile
---
apiVersion: v1
kind: Service
metadata:
name: nsqlookupd-statefulset
spec:
ports:
- port: 4160
name: nsqlookupd-tcp
- port: 4161
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: filebeat
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: filebeat
---
apiVersion: v1
kind: Secret
metadata:
name: hello-secret
type: Opaque
data:
SECRET_VALUE: SGVsbG8gU2VjcmV0
# SGVsbG8gU2VjcmV0 is 'Hello Secret'
---
---
apiVersion: v1
kind: Namespace
metadata:
name: temp
---
apiVersion: v1
kind: Pod
metadata:
name: shell
---
apiVersion: batch/v1
kind: Job
metadata:
name: get-weather
spec:
template:
spec:
containers:
- image: rbudiharso/weather-job
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: periodic-weather
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
#!/bin/sh
# requirements
# - wget
# prepare directory
mkdir -p ~/.local/bin
mkdir -p ~/.config
if ! [ -x "$(command -v tmux)" ]; then
# put this function in your .bashrc or .zshrc and call shf for easy host selection
# requirements:
# - grep
# - fzf
ssf() {
host=$(grep -e "^Host " ~/.ssh/config | awk '{print $2}' | fzf)
echo "SSH session started, connecting to" $host
ssh $host
}
#!/bin/sh
OLDREMOTE=aksivisitama
NEWREMOTE=usetada
sed -i "s/github.com:$OLDREMOTE/github.com:$NEWREMOTE/g" ./.git/config
#!/bin/bash
# create node_exporter.service
cat > /etc/systemd/system/node_exporter.service <<END
[Unit]
Description=node_exporter service
After=network.target
[Service]
ExecStart=/usr/local/bin/node_exporter