Skip to content

Instantly share code, notes, and snippets.

View mizzunet's full-sized avatar
👀
Rookie

MSHB mizzunet

👀
Rookie
  • Black Hole
View GitHub Profile
@mizzunet
mizzunet / memos-nodocker.md
Created February 9, 2023 04:24
Setup Memos server manually without Docker

1. Clone repository

git clone https://github.com/usememos/memos

2. Set working directly

Change profile.Data from memos/server/profile/profile.go (line 60) to your desired directly (/opt/memos)

3. Setup frontend

cd memos/web
yarn && yarn build
@mizzunet
mizzunet / setup.md
Last active January 7, 2024 02:11
Setup Squid Cache Proxy on Arch Linux

Installation

$ yay -S squid

Open firewall

# iptables -L -n -v | grep 3128
    0     0 ACCEPT     tcp  --  *      *       192.168.1.0/24       0.0.0.0/0            state NEW tcp dpt:3128

Generate a CA Certificate to be used by Squid

@mizzunet
mizzunet / ping.sh
Created April 15, 2022 01:28
Ping multple servers and sort
#!/bin/bash
o=output
cap=10
for server in $(cat servers)
do
ping=$(ping "$server" -c $cap)
avg=$(echo $ping| grep avg | cut -d'/' -f 5)
if [[ "$avg" != "" ]]; then
@mizzunet
mizzunet / fastserver.sh
Last active March 16, 2022 08:15
Find fastest instance
#!/bin/bash
echo -n "Possible Values: invidious nitter bibliogram teddit wikiless scribe simplyTranslate lingva searx whoogle rimgo" \n
instances="$@"
listurl="https://raw.githubusercontent.com/tillcash/libredirect/master/src/instances/data.json"
tmpfile="/tmp/output"
# Download list
if test -f data.json; then
echo \n data.json already exists\n, using it \n
@mizzunet
mizzunet / data.json
Created March 15, 2022 07:12
Find fastest instance. Invidious, Nitter, Searx, Wikiless, Scribe etc
## First get json of instances
You may get this from LibRedirect extension repo
https://github.com/libredirect/libredirect/tree/master/src/instances
@mizzunet
mizzunet / config
Created March 14, 2022 19:54
Waybar Configuration
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar at the bottom of your screen
"height": 32, // Waybar height
"modules-left": ["sway/workspaces","sway/mode"],
"modules-center": ["clock",],
"modules-right": ["keyboard-state","custom/protonmail","network","pulseaudio", "battery", "tray"],
"sway/workspaces": {
"icon": false,
"disable-scroll": true,
@mizzunet
mizzunet / 1. config
Last active March 14, 2022 19:53
SwayWM Configuration
# variables
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $menu sirula
set $files nemo
set $browser librewolf
@mizzunet
mizzunet / 1. Key Binding
Last active March 14, 2022 19:49
Vimium C
unmapAll
# Navigating the page
map j scrollDown count=2
map k scrollUp count=2
map G scrollToBottom
map gg scrollToTop
map e scrollPageUp
map d scrollPageDown
map h scrollLeft
@mizzunet
mizzunet / blur.sh
Created March 14, 2022 17:37
Blur Wallpaper on SwayWM using `oguri`
#!/bin/bash
# <Constants>
cache_dir="$HOME/.cache/wallblur"
display_resolution=$(swaymsg -pt get_outputs | grep Current | awk '{print $3}')
# </Constants>
# <Functions>
err() {
@mizzunet
mizzunet / gist:69703175a4bf687f8eafedae88f8eda8
Created November 9, 2021 20:03
Enable ADB and Wireless ADB from TWRP
```
adb shell
mount system
echo '' >> /system/build.prop
echo '# Enable ADB' >> /system/build.prop
echo 'persist.service.adb.enable=1' >> build.prop
echo 'persist.service.debuggable=1' >> build.prop
echo 'persist.sys.usb.config=mtp,adb' >> build.prop
echo 'service.adb.tcp.port=5555' >> build.prop
```