Skip to content

Instantly share code, notes, and snippets.

View KentuckySato's full-sized avatar
🎯
Focusing

kentuckyss KentuckySato

🎯
Focusing
View GitHub Profile
@KentuckySato
KentuckySato / mergeSort.js
Created April 7, 2023 22:06
Merge Sort is one of the most popular and efficient sorting algorithms.
// @see https://www.doabledanny.com/merge-sort-javascript
function mergeSort(arr) {
// Base case
if (arr.length <= 1) return arr
let mid = Math.floor(arr.length / 2)
// Recursive calls
let left = mergeSort(arr.slice(0, mid))
let right = mergeSort(arr.slice(mid))
@KentuckySato
KentuckySato / convert_to_webp.bash
Last active September 11, 2023 21:09
convert images to webp format
Install webp for macOS
brew install webp
And run this command
cwebp -q 80 my_images.png -o my_images.webp
-q 80 is a flag to set the "quality", from 1 (worst) to 100 (best).
@KentuckySato
KentuckySato / remove2FA.sql
Created March 10, 2023 21:58
Remove 2FA in phpMyAdmin
DELETE FROM `phpmyadmin`.`pma__userconfig` WHERE username = 'root';
@KentuckySato
KentuckySato / 000-default.conf
Last active February 9, 2023 13:59
Default RaspberryPi apache2 conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName raspberrypi.local