Skip to content

Instantly share code, notes, and snippets.

View mirashif's full-sized avatar

Mir Ashif mirashif

View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@mirashif
mirashif / package.json
Created November 7, 2022 11:26 — forked from jherr/package.json
Simple monorepo starter
{
"name": "packages",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"scripts": {
"start": "concurrently \"wsrun --parallel start\""
},
"workspaces": [
@mirashif
mirashif / .config
Last active February 14, 2023 21:25
How to set Oh My Posh theme
# windows bash
eval "$(oh-my-posh init bash --config ${POSH_THEMES_PATH}/uew.omp.json)"
# macos zsh
eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/uew.omp.json)"
@mirashif
mirashif / css-reset.css
Created September 10, 2022 19:17
Resets default CSS rules set by the web browsers
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
@mirashif
mirashif / toggle-virtualization.bat
Created July 16, 2022 13:39 — forked from jonpulsifer/toggle-virtualization.bat
Virtualization must be disabled to use CS:GO anti-cheat clients like FACEIT and ESEA, but I like to use WSL2 and Docker, and this script helps me do that
@echo off
echo Virtualization must be disabled to use anti-cheat clients like FACEIT and ESEA
echo.
net session >nul 2>&1
if %ERRORLEVEL% EQU 0 goto :chchchchoices
echo This script requires elevated privileges. Re-run as Administrator to continue
goto :exit
:chchchchoices
@mirashif
mirashif / react-native-setup.md
Created July 1, 2021 13:57
React native project initial setup process.

Initial project setup

  • Initialize expo app:
    expo init my-app
  • Template:
    blank typescript
  • Add strict tsconfig.json
    "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "jsx": "react-native",
@mirashif
mirashif / arrayFlat.js
Created June 10, 2021 14:40
Here is a quick way to flatten a deeply nested array in Javascript.
const nested = [1, 2, [3, 4, [5, 6, [7, 8, [9, 10]]]]];
const flatten = nested.flat(Infinity);
// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
const result = flatten.join(", ");
// "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
@mirashif
mirashif / probhat.md
Last active May 3, 2023 14:12
Probhat unusual keyboard layout cheatsheet

স্বরবর্ণঃ

আ = v

ঈ = E

ঊ = W

ঋ = V

@mirashif
mirashif / typescript-basics.md
Created August 28, 2020 13:51
TypeScript basic syntax to get started building apps.

Types

let a: number,
  b: boolean,
  c: string,
  d: any,
  e: number[] = [1, 2, 3],
  f: any[] = [1, true, 'a', false];

Enumerated type

@mirashif
mirashif / kde-plasma-on-vmware.md
Last active July 5, 2020 18:02
KDE Plasma on VMWare

I've figured a few things out I've not seen posted anywhere so I will conclude this thread with a way that works for me. I've seen posts all over with people that gave up on almost any distro with KDE plasma in a VMWare guest.

tl;dr - switch to Wayland. I am not well versed in the merits/deficits of using Wayland but in my case it allows everything to work correctly using KDE (Kubuntu and Manjaro plasma anyway) in a VM guest.

Install the package plasma-wayland-session. Log out. At the bottom of the default log in screen, there's a menu called "Desktop Session". Select Plasma (Wayland) there and login. As a precaution, you should turn off automatic login until you verify it works correctly.

If it all works in the GUI, run Login Screen (SDDM). On the Advanced page change Auto login to reflect the Wayland session.