Skip to content

Instantly share code, notes, and snippets.

View aanari's full-sized avatar

Ali Anari aanari

View GitHub Profile
@aanari
aanari / global-font.css
Created July 23, 2023 18:32
Stylus Global Font
#read-only-cursor-text-area, pre, code, .js-path-segment, .blob-code, .blob-code-marker, .PRIVATE_TreeView-item-content-text, .react-directory-truncate {
font-family: 'PragmataProMonoLiga Nerd Font' !important;
}
h1, h2, h3, h4, h5, p, a, b, u, em, strong, blockquote, address, cite, q, ul, ol, li, dl, dt, dd {
font-family: 'Seitu' !important;
}
@aanari
aanari / iterm2.plist
Last active July 25, 2023 04:51
iTerm2 Config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
@aanari
aanari / alacritty.yml
Last active August 11, 2023 13:11
Alacritty Config (WSL)
env:
TERM: xterm-256color-italic
WSLENV: TERM
shell:
program: wsl
scrolling:
history: 10000
@aanari
aanari / brow.sh
Created October 18, 2022 19:36
Browsh Helper Script for Neomutt
#!/bin/bash
pkill -u "$(whoami)" -SIGINT firefox
pkill -u "$(whoami)" -SIGINT browsh
FILE=$(echo "$1" | sed -e 's/http:\/\/localhost:20015\/file:\/\///g')
cp "$FILE" "$HOME/.neomutt/tmp"
#HOMEDIR=$(echo $HOME | sed -e 's/\//\\\//g')
#PATTERN="s/file:\/\/$HOMEDIR\///g"
#URL=$(echo $1 | sed -e $PATTERN)
#echo $URL
browsh --startup-url http://localhost:20015/.neomutt/tmp
@aanari
aanari / install_neomutt.sh
Last active October 16, 2022 15:49
Install neomutt
# Run as root
curl -LO https://github.com/neomutt/neomutt/archive/refs/tags/20220429.zip
unzip 20220429.zip
cd neomutt-20220429
apt install xsltproc xml-core libxml2 gettext libidn11-dev libidn2-dev libxml2-utils docbook docbook-xml libgpgme-dev libsasl2-2 gnutls-bin lua5.3 liblua5.3-dev notmuch libnotmuch-dev libdb5.3-dev libdb5.3++-dev libqdbm-dev libqdbm++-dev libgdbm-dev liblmdb-dev libkyotocabinet-dev librocksdb-dev libtdb-dev libtokyocabinet-dev libl4-dev libzstd-dev
./configure --everything
make
make install
@aanari
aanari / wsl_ssh.bat
Created July 23, 2022 16:11
SSH and WSLHostPatcher
rem This starts up everything for WSL2
C:\windows\system32\wsl.exe -e exit
rem and then it starts up WSLHostPatcher
C:\"Program Files"\WSLHostPatcher\WSLHostPatcher.exe
rem Finally, it starts the SSH server
C:\windows\system32\wsl.exe -e sudo service ssh start
@aanari
aanari / remote.sh
Created July 22, 2022 15:42
SSH with clipboard sync
#!/bin/bash
# Copy this to /usr/local/bin/remote
ps cax | grep lemonade> /dev/null
if [ $? -eq 0 ]; then
echo "lemonade is running."
else
echo "lemonade is not running."
nohup lemonade server &
fi
@aanari
aanari / xclip.sh
Last active July 23, 2022 16:05
Custom xclip for clipboard sync (Local WSL 2.0, Remote SSH)
#!/bin/bash
# Copy this to /usr/local/bin/xclip
stdin="$([[ -p /dev/stdin ]] && cat -)"
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
else
case $(ps -o comm= -p "$PPID") in
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
@aanari
aanari / use lemonade for remote clipboard sharing
Created July 19, 2022 05:34 — forked from bketelsen/use lemonade for remote clipboard sharing
how to use lemonade to share a clipboard between remote computers
on local and remote machine:
go get github.com/pocke/lemonade (if you have Go installed, if not download lemonade binary from github)
make sure $GOPATH/bin is in your path on both machines
-- or move $GOPATH/bin/lemonade to a place already in your path like /usr/local/bin
on your local machine add a script like this:
cat ~/bin/remote
@aanari
aanari / chadrc.lua
Last active September 18, 2023 18:36
NvChad Config
local M = {}
M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {}
M.options.tabstop = 4
M.plugins = {
status = {
neoscroll = true,
colorizer = true,
truezen = true,