Skip to content

Instantly share code, notes, and snippets.

View OnCloud125252's full-sized avatar
👾
Working from home

OnCloud OnCloud125252

👾
Working from home
View GitHub Profile
@OnCloud125252
OnCloud125252 / Batch Run As Administrator.bat
Last active January 20, 2024 02:23
Run Batch As Administrator
TITLE Asking for administrator access
MODE CON COLS=37 LINES=3
COLOR F0
ECHO :::::::::::::::::::::::::::::::::::::
ECHO :: Requesting administrator access ::
ECHO :::::::::::::::::::::::::::::::::::::
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %Apply%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
COLOR
CLS

Install dependencies

sudo apt update && sudo apt install curl gpg

Add gpg key

curl https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/nginx_signing.gpg

Download and unpack Btop++

wget https://github.com/aristocratos/btop/releases/latest/download/btop-x86_64-linux-musl.tbz -O btop-x86_64-linux-musl.tbz && tar -xvjf btop-x86_64-linux-musl.tbz && rm btop-x86_64-linux-musl.tbz

Install Btop++

sudo apt install build-essential && cd btop && sudo make install && cd ..
#!/bin/bash
# Colors
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Symbols
#!/bin/bash
# Colors
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Symbols
@OnCloud125252
OnCloud125252 / check_electron.sh
Created January 24, 2025 06:53
Check if app is based on Electron on macOS.
scan_dir="/Applications" && find "$scan_dir" -name "*.app" -prune -exec sh -c '
app_path="$1"
if [ -d "$app_path/Contents/Frameworks" ]; then
if strings "$app_path/Contents/Resources/app.asar" 2>/dev/null | grep -q "electron"; then
echo "$app_path is an Electron app (based on App/Contents/Resources/app.asar)"
elif ls "$app_path/Contents/Frameworks/"* 2>/dev/null | grep -qi "Electron Framework"; then
echo "$app_path is an Electron app (based on App/Contents/Frameworks/)"
fi
fi
' _ {} \;