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 / 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
' _ {} \;
#!/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

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 ..

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
@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
@OnCloud125252
OnCloud125252 / Installing Portainer with Docker and Configuring MTU.md
Last active August 28, 2023 11:31
A step-by-step guide to installing Portainer, a Docker management tool, and configuring the MTU setting. Includes Docker installation, MTU issue fixes, permission error resolution, and Portainer deployment using Docker.

Before Starting

Supported Installation

Operating System Tool
Ubuntu Server 22.04 LTS Docker version 20.10.25, build 20.10.25-0ubuntu1~23.04.1, Portainer 2.18
Ubuntu Server 23.04 Docker version 20.10.25, build 20.10.25-0ubuntu1~23.04.1, Portainer 2.18

Installation

@OnCloud125252
OnCloud125252 / Setting Up Zsh With Oh-My-Zsh.md
Last active March 16, 2025 19:17
Setting up Zsh with Oh-My-Zsh and custom theme on Ubuntu
@OnCloud125252
OnCloud125252 / MCSManager_Installation.md
Created April 15, 2023 19:54
Install MCSManager on Ubuntu
@OnCloud125252
OnCloud125252 / Webmin_Installation.md
Last active April 18, 2023 20:16
Install Webmin on Ubuntu