Skip to content

Instantly share code, notes, and snippets.

View itsmikita's full-sized avatar
🤡
Psyborg

It's Mikita itsmikita

🤡
Psyborg
View GitHub Profile
@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",
@itsmikita
itsmikita / KILL-KUBERNETES-MACOS.md
Last active December 17, 2023 17:03
How to uninstall Kubernetes (microk8s, minikube, podman, docker, kubernetes-cli) from macOS

How to uninstall Kubernetes (microk8s, minikube, podman, docker, kubernetes-cli) from macOS

I've been trying out all different kinds of containerization and it's a good to have one reminder for myself how to reset the system. So here it goes:

Remove microk8s

The ubuntu guys did it nice and implemented the uninstall sub-command. To uninstall microk8s from your system run:

microk8s uninstall
@itsmikita
itsmikita / MONOREPO.md
Last active January 21, 2024 10:56
How to create a monorepo

How to create a monorepo

  1. Create the root folder:
mkdir monorepo
  1. Create monorepo's package.json:
@itsmikita
itsmikita / WORDPRESS-FILE-PERSMISSIONS.md
Last active December 18, 2023 23:20
WordPress file permissions

WordPress file permissions

sudo chown www-data:www-data  -R *          # Let Apache be the owner
sudo find . -type d -exec chmod 755 {} \;   # Change directory permissions (rwxr-xr-x)
sudo find . -type f -exec chmod 644 {} \;   # Change file permissions (rw-r--r--)

General Mastering EQs

Kick Drum

Any apparent muddiness can be rolled off around 300Hz. Try a small boost around 5-7kHz to add some high end.

50-100Hz ~ Adds bottom to the sound 100-250Hz ~ Adds roundness 250-800Hz ~ Muddiness Area 5-8kHz ~ Adds high end prescence

@itsmikita
itsmikita / adjectives.js
Created October 22, 2023 18:04
Generate Random People Names and Phrases
// the list is generated by a custom ml agent
export const adjectives = [
"benevolent",
"charming",
"diligent",
"elegant",
"fantastic",
"graceful",
"humble",
"inquisitive",
@itsmikita
itsmikita / d2h.sh
Created October 15, 2023 15:58
Convert Decimals to Hexadecimals and backwards in Shell
#!/bin/bash
# convert decimal (0-255) to hexadecimal (00-FF)
function d2h() { printf "%X\n" $1 }