Skip to content

Instantly share code, notes, and snippets.

@budiantoip
budiantoip / docker local dependencies.md
Last active October 19, 2022 14:34
Docker Local Dependencies

PHP Docker

apt-get install -y autoconf make gcc

Composer 2.0

Reference : https://blog.packagist.com/composer-2-0-is-now-available/ Download using wget and then replace the existing composer command inside the bin folder

wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet
@budiantoip
budiantoip / ReactJS Cheatsheet
Created April 12, 2021 11:28
ReactJS Cheatsheet
// Create react app in the current folder
npx create-react-app .
// React’s useEffect Hook to call API
@budiantoip
budiantoip / Docker Swarm Installation
Last active January 20, 2023 07:32
Docker Swarm Installation
------------------------------------------------
Steps
------------------------------------------------
1. Preparation
- Prepare the manager and worker nodes
- Run `sestatus` command (make sure Current mode is enforcing)
- Make sure to use docker the latest version
2. Open Ports
3. Create swarm
4. Visualize using docker swarm visualizer
@budiantoip
budiantoip / Docker Compose for Swarm
Created April 22, 2021 13:57
Docker Compose for Swarm
version: '3.1'
services:
wordpress:
image: wordpress
deploy:
replicas: 1
restart_policy:
condition: on-failure
@budiantoip
budiantoip / Podman
Last active May 12, 2022 21:00
Podman
// check the podman version
sudo podman --version
// search for container image
sudo podman search rhel
// search with filter
sudo podman search rhel --filter="is-official=true"
// pull image
@budiantoip
budiantoip / deploy.sh
Created May 4, 2021 00:54 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin master
@budiantoip
budiantoip / NestJS
Last active August 7, 2021 21:04
NestJS
// install the cli command
npm -i g @nestjs/cli
// create a new project
nest new <project_name>
// Create a controller
nest g controller <controller_name>
// Create a service
@budiantoip
budiantoip / Angular
Last active March 2, 2022 03:56
Angular
// Install Angular CLI
npm install -g @angular/cli
// Use a specific version of Angular
npm uninstall -g @angular/cli
npm install -g @angular/cli@12 // Install Angular 12
ng new my-app // Create new app using angular 12
// Setup a new Angular app
ng new blog
@budiantoip
budiantoip / Python.md
Last active May 13, 2023 04:20
Python