Skip to content

Instantly share code, notes, and snippets.

@novousernx
novousernx / clone.bash
Created January 25, 2021 09:01 — forked from milanboers/clone.bash
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
@novousernx
novousernx / post-receive.sh
Created January 23, 2021 07:38 — forked from benfrain/post-receive.sh
post-receive hook for multiple branches
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch
echo 'Changes pushed live.'
fi
@novousernx
novousernx / node_nginx_ssl.md
Created January 13, 2021 19:49 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@novousernx
novousernx / docker_wordpress.md
Created January 13, 2021 07:26 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/instance: ingress-nginx
---
# I m installing linkding with persistent storage ( To know about What persistent storage is, check out my Kubernetes 101 post )
# YAML for Persistent Volume ( pv.yml )
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: data
spec:
accessModes:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio
spec:
strategy:
# Specifies the strategy used to replace old Pods by new ones
# Refer: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
type: Recreate
@novousernx
novousernx / README.md
Created January 10, 2021 16:08 — forked from maissani/README.md
Kubernetes Install and Dashboard Token with pods service and whatever like minecraft servers

#BEFORE ALL

sudo iptables -P FORWARD ACCEPT
OR
sudo ufw default allow routed

ETAPE 1

snap install microk8s --classic
@novousernx
novousernx / setup-kubeflow-microk8s.sh
Created January 10, 2021 16:01 — forked from fdasilva59/setup-kubeflow-microk8s.sh
Shell script to install MicroK8S and Kubeflow (v0.7 by default) on an Ubuntu single node workstation. (Script is self-documented)
#!/bin/bash
# -----------------------------------
# This script will install MicroK8S
# and Kubeflow on an Ubuntu
# workstation (single node).
#
# Documentation is self included in
# this script. Display help with:
#
# install snap
sudo apt install snapd
# install microk8s
snap install microk8s --classic
# enable dns, dashboard, and storage
microk8s.enable dns dashboard storage metrics-server
microk8s.kubectl proxy --accept-hosts=.* --address=0.0.0.0 &