Skip to content

Instantly share code, notes, and snippets.

View nurdiansyah's full-sized avatar
👨‍💻

Nurdiansyah nurdiansyah

👨‍💻
View GitHub Profile
@nurdiansyah
nurdiansyah / create template proxmox ubuntu 20.04
Last active October 25, 2024 08:21 — forked from aleksul/script.sh
Proxmox create Ubuntu 20.04 template
# download ubuntu-cloud image
# NOTE: ubuntu-server won't properly work with cloud-init for some reason
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
# NOTE: no need for sudo because we already login as root
# install image customization tool
apt update -y && apt install libguestfs-tools -y
# install qemu-guest-agent inside of image
@nurdiansyah
nurdiansyah / install.sh
Last active January 30, 2024 10:55 — forked from hydrz/install.sh
High Availability K3s and Kube-vip with Cilium
#!/bin/sh
set -e
set -o noglob
# Usage: ./install.sh [options]
#
# Example:
# Installing on first master node run:
# ./install --num 3 --vip 192.168.2.10 --iface eth0
# Installing on other master nodes run:
@nurdiansyah
nurdiansyah / Setup MongoDB on localhost as Replica Set
Created December 16, 2021 09:48 — forked from davisford/Setup MongoDB on localhost as Replica Set
Setup MongoDB replica set on local host with only a single primary
Add the `replication` section to the mongod.conf file:
```
$cat /usr/local/etc/mongod.conf
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
engine: mmapv1

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@nurdiansyah
nurdiansyah / docker-for-mac.md
Created October 6, 2021 08:57 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


Svelte 42 hrs 40 mins ████████████▉░░░░░░░░ 61.9%
JavaScript 13 hrs 35 mins ████▏░░░░░░░░░░░░░░░░ 19.7%
CSS 4 hrs 42 mins █▍░░░░░░░░░░░░░░░░░░░ 6.8%
JSON 3 hrs 21 mins █░░░░░░░░░░░░░░░░░░░░ 4.9%
TypeScript 1 hr 34 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.3%
@nurdiansyah
nurdiansyah / letsencrypt_2020.md
Created May 22, 2021 05:38 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@nurdiansyah
nurdiansyah / iterm2.md
Created November 20, 2020 09:38 — 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)
@nurdiansyah
nurdiansyah / Docker shell commands.sh
Created March 24, 2020 06:17 — forked from bahmutov/Docker shell commands.sh
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@nurdiansyah
nurdiansyah / 00_etc-hosts.md
Created January 28, 2020 03:12 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Netflix, Reddit, and Imgur.

Unblock Vimeo, Netflix, Reddit, dan Imgur

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows