Skip to content

Instantly share code, notes, and snippets.

View afrieirham's full-sized avatar
🏠
Working from home

Afrie Irham afrieirham

🏠
Working from home
View GitHub Profile
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 30, 2024 08:44
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

@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 1, 2024 19:13
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
@bradtraversy
bradtraversy / docker-help.md
Last active April 30, 2024 17:28
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@bradtraversy
bradtraversy / ssh.md
Last active May 3, 2024 09:18
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@bradtraversy
bradtraversy / myscript.sh
Last active May 2, 2024 13:59
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@davidpiesse
davidpiesse / Schedulable.php
Last active September 7, 2023 15:22
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@rveciana
rveciana / .block
Last active January 23, 2023 04:45
Malaysia flag map
licence: mit
@wosephjeber
wosephjeber / ngrok-installation.md
Last active March 22, 2024 15:55
Installing ngrok on Mac

Installing ngrok on OSX

For Homebrew v2.6.x and below:

brew cask install ngrok

For Homebrew v2.7.x and above: