Skip to content

Instantly share code, notes, and snippets.

View itsmikita's full-sized avatar

It's Mikita itsmikita

View GitHub Profile
@itsmikita
itsmikita / missing_links.sh
Last active June 20, 2024 18:30
Find missing symlinks (tested on Linux & macOS)
@itsmikita
itsmikita / podman-wordpress-mariadb.sh
Created June 18, 2024 15:25 — forked from sbe-arg/podman-wordpress-mariadb.sh
Wordpress + MariadDB with podman local development
podman pod create --publish 8080:80 --name demo.wp.1
podman run -d --name wp.db --pod demo.wp.1 \
-e MARIADB_USER=mariadb \
-e MARIADB_PASSWORD=mariadb \
-e MARIADB_ROOT_PASSWORD=mariadb \
docker.io/library/mariadb
podman exec -it wp.db \
mysql -e "CREATE DATABASE wordpress;" --user=root --password=mariadb
@itsmikita
itsmikita / fontsinstall.sh
Last active June 20, 2024 19:00
(Arch) Linux CLI to install multiple fonts simultaneously
#!/bin/bash
# Function to display usage
usage() {
echo "Usage: $0 [-s] <file_or_directory_path>..."
echo " -s Install fonts system-wide (requires sudo)"
exit 1
}
# Function to install fonts and update font cache
@itsmikita
itsmikita / NERD-FONT-SYMBOLS.md
Last active May 31, 2024 20:14
When your Nerd Font not displaying any icons on (Arch) Linux.
  1. Remove no-bitmaps setting from your fontconfig:
mv cd /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf ~/Downloads
  1. Install ttf-nerd-fonts-symbols, ttf-nerd-fonts-symbols-common and ttf-nerd-fonts-symbols-mono packages from AUR:
yay ttf-nerd-fonts-symbols
@itsmikita
itsmikita / README.md
Created May 31, 2024 10:34
Install Arch Linux on Microsoft Surface Laptop (linux-surface)

If you get error Failed to read disk ... with lsblk when installi9ng Arch Linux with archinstall, try this:

  1. Boot archiso.

  2. Run lsblk:

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0 705.6M  1 loop /run/archiso/airootfs
sda           8:0    1  29.9G  0 disk
@itsmikita
itsmikita / starship.toml
Created May 31, 2024 09:22
Starship configuration.
# ~/.config/starship.toml
# get editor completions based on config schema
"$schema" = "https://starship.rs/config-schema.json"
# Add new line
add_newline = false
# Command execution timeout
command_timeout = 2000
@itsmikita
itsmikita / firmware.sh
Created March 28, 2024 02:46
T2Linux -- Wifi & Bluetooth (improved) firmware bash script
#!/usr/bin/env bash
#
# Copyright (C) 2022 Aditya Garg <gargaditya08@live.com>
# Copyright (C) 2022 Orlando Chamberlain <redecorating@protonmail.com>
#
# The python script is based upon the original work by The Asahi Linux Contributors.
""":"
set -euo pipefail
@itsmikita
itsmikita / shuffle.js
Created February 27, 2024 03:29
Shuffle JavaScript Object
/**
* Shuffle Object
*
* The Schwartzian Transform way @link https://en.wikipedia.org/wiki/Schwartzian_transform
* Stolen from @link https://stackoverflow.com/a/46545530
*
* @param {object|Array} unshuffled
*/
export const shuffle = unshuffled => unshuffled
.map(value => ({value, sort: Math.random()}))
@itsmikita
itsmikita / markdownToHtml.js
Created February 27, 2024 03:10
Markdown to HTML
export function function markdownToHtml(markdown) {
// Handle Links
markdown = markdown.replace(/\[(.*?)\]\((.*?)\)/g, '<a href="$2">$1</a>');
markdown = markdown.replace(/<([^>]+)>/gim, '<a href="$1">$1</a>');
// Handle Headings
markdown = markdown.replace(/^#\s(.*$)/gm, '<h1>$1</h1>');
markdown = markdown.replace(/^##\s(.*$)/gm, '<h2>$1</h2>');
markdown = markdown.replace(/^###\s(.*$)/gm, '<h3>$1</h3>');
@itsmikita
itsmikita / svgo.config.js
Created February 26, 2024 22:00
Optimized configuration for optimizing SVGs 🤡
export default {
// js2svg: {
// indent: " ",
// pretty: true
// },
multipass: true,
plugins: [
"cleanupAttrs",
"cleanupEnableBackground",
"cleanupIds",