Skip to content

Instantly share code, notes, and snippets.

View goeroeku's full-sized avatar

Agus Indra Cahaya goeroeku

View GitHub Profile
@alyleite
alyleite / wsl.md
Last active April 15, 2024 06:34
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor:
@goeroeku
goeroeku / fastcgi-php.conf
Last active July 22, 2020 22:53
Script VPS
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
@goeroeku
goeroeku / .prettierrc.md
Created March 11, 2020 04:27
All about VS Code - Prettier - ESLint

Rule:

  1. wraping if length : 100
  2. using single Quote
  3. using comma
  4. using parenthesis
{
  "printWidth": 100,
  "singleQuote": true,
 "trailingComma": "all",
@chrisoldwood
chrisoldwood / autounattend.xml
Created November 25, 2019 16:12
Example Packer configuration files for creating a Windows 10 VM on QEMU/KVM/libvirt.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<SystemLocale>en-US</SystemLocale>
@chriswayg
chriswayg / create-cloud-template.sh
Last active May 1, 2024 20:47
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@goeroeku
goeroeku / Readme.md
Created December 26, 2018 03:29
Production vue & nodejs
  • Gunakan pm2
  • build vue
yarn build
  • buat server nodejs menggunakan express dan serve-static
yarn add express serve-static
  • jalankan vue menggunakan nodejs
@irazasyed
irazasyed / 1-dnsmasq-dnscrypt-proxy-setup.md
Last active January 23, 2024 19:56
How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

Using Laravel Valet for localhost development, So it installs dnsmasq with it. dnsmasq runs on port 53, The default DNS port. So we setup dnscrypt-proxy on port 5300 with the default config files in this gist.

dnscrypt-proxy Installation

brew install dnscrypt-proxy
@FauziFerdiansyah
FauziFerdiansyah / helper.php
Last active January 7, 2020 17:18
Membuat helper tanggal Indonesia di laravel 5.* menggunakan CARBON
// ini diletakan di HELPER atau langsung di controllernya
public static function keIndonesia($tgl) {
$dt = new \Carbon\Carbon($tgl);
setlocale(LC_TIME, 'IND');
return $dt->formatLocalized('%A, %e %B %Y'); // Senin, 3 September 2018
}
@sbooth
sbooth / cloudflared
Last active April 15, 2022 18:30
dnsmasq with dnscrypt-proxy + cloudflared
# /etc/logrotate.d/cloudflared
/var/log/cloudflared/cloudflared.log {
rotate 7
daily
compress
missingok
notifempty
}