Skip to content

Instantly share code, notes, and snippets.

View yukebrillianth's full-sized avatar
✏️
Sibuck

Yuke Brilliant H. yukebrillianth

✏️
Sibuck
View GitHub Profile
@mrl22
mrl22 / README.md
Created April 11, 2023 12:08
PHP 8.2 Support for Apache and NGINX (OpenResty) on Moss.sh

Do not copy and paste this code, it requires changes

Other PHP versions available here: https://gist.github.com/search?q=user%3Amrl22+moss

As of writing this, Moss.sh does not support PHP 8.2 via the control panel even though Ubuntu does.

Set up your website using Moss.sh and select Apache with PHP 7.4.

Once complete, we need to install PHP 8.2 with all the packages moss installs for 7.4.

@gilangvperdana
gilangvperdana / README.md
Last active February 25, 2024 17:30
Make your Ubuntu Server be Router!

Goals

  • Can use Ubuntu Server 20.04 LTS to be Router Gateway include DHCP Server
  • Client who connected to Ubuntu Server can be access Internet

Environement

  • Ubuntu 20.04 LTS
  • 2 Interface
    • 1 Interface from WAN / ISP (enp2s0)
    • 1 Interface for distribution clients (enx00e04c534458)
@marfillaster
marfillaster / unifi_container_rb5009.md
Last active June 8, 2024 16:29
Running Unifi Network Controller as a container in MikroTik ROSv7 RB5009

Requirement

  • USB flash drive - this is where the container filesystem will be persisted

Set-up docker bridge network

/interface bridge add name=docker

Set-up veth to be used by container

@kresnasatya
kresnasatya / command.sh
Last active May 14, 2024 17:13
Deploy Laravel with Deployer in Github Actions
# Create user deployer with root account
adduser deployer
# Append (-a) a secondary group (-G) "www-data" to user "deployer"
usermod -a -G www-data deployer
# See groups assigned to user "deployer"
groups deployer
# Add ACL permission in /var/www
@animir
animir / user.controller.ts
Last active March 2, 2024 08:28
Nest.js prevent brute-force against authorisation example
import { Request, Response } from 'express';
import { Body, Controller, Post, Req, Res } from '@nestjs/common';
import { UserService } from './user.service';
import * as Redis from 'ioredis';
import { RateLimiterRedis } from 'rate-limiter-flexible';
const redisClient = new Redis({enableOfflineQueue: false});
const maxWrongAttemptsByIPperDay = 100;
const maxConsecutiveFailsByUsernameAndIP = 5;
@odan
odan / xampp_php7_xdebug.md
Last active May 29, 2024 13:56
Installing Xdebug for XAMPP
@ashleydw
ashleydw / nginx.conf
Last active January 8, 2024 15:32
Laravel nginx conf file
server {
listen 80 default_server;
server_name example.com www.example.com;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
root /srv/www/example.com/public;
index index.php index.html;