Skip to content

Instantly share code, notes, and snippets.

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

Yoga Hanggara yohangdev

🏠
Working from home
View GitHub Profile
@yohangdev
yohangdev / README.md
Created February 25, 2025 17:39 — forked from marshyon/README.md
Golang Echo web server VueJS App in history mode and Go web services

Golang Echo web server VueJS App in history mode and Go web services

In an previous gist a VueJS application was served using a plain net/http server.

This version uses the Echo web server framework and adds the diversion of any '404' (page not found) errors to the index.html page of the VueJS application. With this enabled, any VueJS routed URLs that are 'bookmarked' by a user will be sent to the index.html of the VueJS application. This way 'routing' is passed to the single page app running on the clients browser.

@yohangdev
yohangdev / xdebug-mac.md
Created October 14, 2023 11:11 — forked from ankurk91/xdebug-mac.md
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@yohangdev
yohangdev / helpful-docker-commands.sh
Created October 17, 2021 11:06 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@yohangdev
yohangdev / arm.md
Created September 15, 2020 14:46 — forked from alexellis/arm.md
Test swarm connectivity

Regular PC / cloud architecture (64-bit)

See the snippets "guide.md" and "redis.md" below.

Swarm on a Raspberry Pi

If you're wanting to run Docker Swarm on your Raspberry Pi checkout these instructions:

@yohangdev
yohangdev / arch-linux-install
Last active May 22, 2019 17:08 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
docker ps -f status=exited | grep "\-cache-" | awk '{print $1}' | xargs docker rm
@yohangdev
yohangdev / oauth.js
Created January 29, 2018 18:13 — forked from srph/oauth.js
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
#!/bin/sh
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e
# Must be a valid filename
NAME=foo
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/local/bin/bar
<?php
/**
* LDAP PHP Change Password Webpage
* @author: Matt Rude <http://mattrude.com>
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
*
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991