This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import get | |
from bs4 import BeautifulSoup | |
from sys import argv, stdout | |
from time import time | |
from shutil import get_terminal_size | |
strip = lambda str: str[:min(str.find('?'), str.find('/'))] if '?' in str or '/' in str else str | |
def download(id, title): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
min() { | |
for stream in $(termux-volume | jq -r ".[].stream"); do | |
termux-volume $stream 0 | |
done | |
echo "Mode: Silent" | |
termux-toast "Mode: Silent" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Color snippets | |
black="\033[0;30m" | |
red="\033[0;31m" | |
bred="\033[1;31m" | |
green="\033[0;32m" | |
bgreen="\033[1;32m" | |
yellow="\033[0;33m" | |
byellow="\033[1;33m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install GNU Emacs | |
sudo pacman -S emacs | |
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d | |
~/.emacs.d/bin/doom install | |
~/.emacs.d/bin/doom sync | |
echo " | |
[Unit] | |
Description=Emacs Daemon | |
After=syslog.target network.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Installing tigervnc....." | |
sleep 1 | |
sudo pacman -S tigervnc | |
clear | |
echo "Set your password for VNC..." | |
sleep 2 | |
vncpasswd | |
display=$(xdpyinfo | awk '/dimensions/{print $2}') | |
sessions=$(ls /usr/share/xsessions) | |
desktop_sessions=$(echo "$sessions" | grep -E "plasma|gnome|xfce|lxqt|cinnamon|mate") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Color snippets | |
black="\033[0;30m" | |
red="\033[0;31m" | |
bred="\033[1;31m" | |
green="\033[0;32m" | |
bgreen="\033[1;32m" | |
yellow="\033[0;33m" | |
byellow="\033[1;33m" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import exc_info, version_info | |
from os.path import abspath | |
blue = "\033[0;34m" | |
white ="\033[0;37m" | |
red = "\033[0;31m" | |
error = "{}[{}!{}] {}".format(blue, white, blue, red) | |
def exception_handler(e, multiline=False): | |
lines_arr = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const path = require("path"); | |
const react2next = (startPath = "./", extension = "js") => { | |
let notFound = true; | |
const recursive = (startPath, extension) => { | |
const ext = "." + extension; | |
const files = fs.readdirSync(startPath); | |
for (let i = 0; i < files.length; i++) { | |
const relPath = (dir) => path.join(startPath, dir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crc() { | |
if [ -z "$1" ]; then | |
echo "Usage: crc <Component>" | |
return 1 | |
fi | |
file=`echo ${1} | awk '{ print toupper(substr($0, 1, 1)) substr($0, 2) }'` | |
folder=`echo ${1} | awk '{ print tolower(substr($0, 1, 1)) substr($0, 2) }'` | |
if [[ -d ${1} || -d ${folder} || -d ${file} ]]; then | |
echo "Already Exists!" | |
return 1 |
NewerOlder