Skip to content

Instantly share code, notes, and snippets.

View yukebrillianth's full-sized avatar
✏️
Sibuck

Yuke Brilliant H. yukebrillianth

✏️
Sibuck
View GitHub Profile
@ashleydw
ashleydw / nginx.conf
Last active October 29, 2024 12:07
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;
@odan
odan / xampp_php7_xdebug.md
Last active October 19, 2024 04:15
Installing Xdebug for XAMPP
@animir
animir / user.controller.ts
Last active August 10, 2024 15:12
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;
@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
@marfillaster
marfillaster / unifi_container_rb5009.md
Last active October 10, 2024 20:51
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

@gilangvperdana
gilangvperdana / README.md
Last active September 7, 2024 10:17
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)
@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.