AKZN Notes

Archives for My Lazy and Forgetful Mind

Archives

Mikrotik Cheat Sheet

Cheat Sheet Map Usability Code example Filter Log Link Detail Filter Log log print where message~"the-text-you-want" and (topics~"topic-name-1" or topics~"topics-name-2") PPPOE Setup PPP>Secret Setting secret for client. If you use radius, click tab PPP Auth&Accounting instead, set it to use Radius PPP>Profiles Local Address: use ip address interface local that will be used for PPPoE […]

Freeradius + Daloapi + mikrotik

Daloapi setting install freeradius (with mysql) and daloradius daloradius need php-pear and php-db sudo apt-get install php-common php-gd php-curl php-mail php-mail-mime php-pear php-db sudo pear install db deploy daloapi from git, setting database as same with freeradius setting, make sure daloapi database migration is set. after git deployment .env.example to .env configure db credential to […]

[ubuntu][xrandr] Autodetect Display

cant get to work, use autorandr instead https://github.com/phillipberndt/autorandr config file on ~/.config/autorandr/ just in case some error(like what happened to me), just edit some parameter on those files that make errors, taken from https://unix.stackexchange.com/a/11891 with fix and personal customization I’m using this simple (homemade) script that keeps polling RandR and switches between LVDS1 and VGA1 […]

Install FreeRADIUS & daloRADIUS on Ubuntu 20.04 + MySQL/MariaDB

taken from https://bytexd.com/freeradius-ubuntu/ with a few update to support daloRADIUS with freeradius v3.0. (as is, daloradius only support freeradius v2, and accounting will error) (TBA) add mikrotik radius client (TBA) add tutorial sqlcounter daloradius scheme to freeradius In this tutorial we’ll install FreeRADIUS on a server running Ubuntu 20.04 and configure it to work with […]

Windows Ubuntu Virtual Box Update Hash Sum Missmatch Fix

On installing Ubuntu as guest from Windows Host, if you got an error Update Hash Sum Missmatch Fix, this is a fix for that Based on https://askubuntu.com/a/1242739 Try this before running apt: $ sudo bash # mkdir /etc/gcrypt # echo all >> /etc/gcrypt/hwf.deny Because apt use sha256 method from libgcrypto20, but optimized too much. We […]

How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

source : https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Introduction Let’s Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. Currently, the entire process of obtaining and […]

Git deploy to VPS

for the impatients Set up the new bare repo on the server: $ ssh myserver.com Welcome to myserver.com! $ mkdir /var/git/myapp.git && cd /var/git/myapp.git $ git –bare init Initialized empty Git repository in /var/git/myapp.git $ exit Bye! Add the remote repository to your existing local git repo and push: $ cd ~/Sites/myapp $ git remote […]

Untrack files already added to git repository based on .gitignore

Let’s say you have already added/committed some files to your git repository and you then add them to your .gitignore; these files will still be present in your repository index. This article we will see how to get rid of them. Step 1: Commit all your changes Before proceeding, make sure all your changes are […]

Laravel Cheat Sheet

factory call using tinker PHP Artisan tinker App\Model\(model name)::factory()->count(5)->create(); databases php artisan db:seed –class=TestSeeder php artisan make:migration create_flights_table php artisan migrate:rollback –step=1 composer composer dump-autoload git git pull origin main API sanctum error CSRF token mismatch add this on .env SESSION_DOMAIN=localhost SANCTUM_STATEFUL_DOMAINS=localhost:8081 <–depend on your php conf

Deploy Laravel Project to Hosting or VPS

Deploy to CPanel Clone git to cpanel Taken from https://dashboard.webhostingmagic.com/knowledgebase/242/How-To-Clone-A-Private-Github-Repo-To-A-cPanel-Server.html Git private repository requires SSH access. So you must ensure that your hosting package has SSH enabled (customers on Web Hosting Magic need not worry as every hosting package comes with SSH access) and perform additional steps in order to successfully clone a privately-hosted remote […]