Skip to content

Instantly share code, notes, and snippets.

View yogithesymbian's full-sized avatar
✔️
scodeid - open source code id

Yogi Arif Widodo yogithesymbian

✔️
scodeid - open source code id
View GitHub Profile
@yogithesymbian
yogithesymbian / mask_phone_number.ts
Created May 7, 2025 00:35
marsk phone number | yo security yo data ai
function maskPhoneNumber(phone) {
return phone.replace(/^(\d{4})\d{4}(\d{3})$/, '$1*****$2');
}
@yogithesymbian
yogithesymbian / script-setup-github-auto-v2.md
Created May 1, 2025 23:09
script-setup-github-auto-v2.md
#!/bin/bash
# 🎨 Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
IDENTITIES_FILE="$HOME/.gh-identities.json"
@yogithesymbian
yogithesymbian / script-setup-github-auto-v1.md
Last active May 1, 2025 23:06
script-setup-github-auto V1 | multi account
#!/bin/bash
# 🎨 Warna
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${BLUE}=== Setup Akun GitHub dengan SSH dan Git Identity ===${NC}"
@yogithesymbian
yogithesymbian / cheat sheet multi account git.md
Created May 1, 2025 23:03
cheat sheet multi account git

🔄 Cara Ubah Remote Origin URL (kalau sudah terlanjur clone): Kalau kamu sudah clone dan ingin ganti ke alias yang benar, kamu tinggal jalankan ini di dalam folder project:

bash Copy Edit

git remote set-url origin [email protected]:yogithesymbian/api-yoai-nodejs.git

Setelah itu kamu bisa git pull, git push, dll tanpa error dan pakai akun yang benar.

@yogithesymbian
yogithesymbian / steam.md
Created March 18, 2025 06:24
steam crossover

Hi, I solved it (temporarly)

Run your steam with:

-forcesteamupdate -forcepackagedownload -overridepackageurl http://web.archive.org/web/20240520if_/media.steampowered.com/client -exitsteam

It wil downgrade.

And after, run it with:

"scripts": {
"build": "source $HOME/.nvm/nvm.sh; nvm use 12; vue-cli-service build",
"build:development": "source $HOME/.nvm/nvm.sh; nvm use 12; vue-cli-service build --mode development",
"start": "source $HOME/.nvm/nvm.sh; nvm use 18; vue-cli-service serve",
"start:production": "source $HOME/.nvm/nvm.sh; nvm use 18; vue-cli-service serve --mode production",
"lint": "source $HOME/.nvm/nvm.sh; nvm use 18; vue-cli-service lint",
"clean": "rm -rf package-lock.json && rm -rf node_modules && npm install --legacy-per-deps && npm run start",
"build:deploy": "source $HOME/.nvm/nvm.sh; nvm use 12 && npm run build && find ../visitor-dist -mindepth 1 ! -name '.git' ! -name '.gitignore' -exec rm -rf {} + && cp -R dist/* ../visitor-dist/"
},
@yogithesymbian
yogithesymbian / rp2040.md
Created February 16, 2025 02:46
raspberry pi 2040

Ya, untuk menambahkan JSON file board Raspberry Pi Pico di Arduino IDE, ikuti langkah-langkah berikut:

1. Buka Arduino IDE

Pastikan Anda sudah menginstal Arduino IDE versi 1.8.13 atau lebih baru.

2. Buka Preferences

  • Di Windows: Klik FilePreferences.
  • Di macOS: Klik Arduino IDEPreferences.

3. Tambahkan URL JSON

@yogithesymbian
yogithesymbian / .zshr
Created February 10, 2025 05:34
~/.zshr php config
laravel_pub() {
local IP=${1:-$(ipconfig getifaddr en0)} # Use argument if provided, otherwise get local IP
if [[ -z "$IP" ]]; then
echo "❌ Failed to determine IP address. Falling back to 127.0.0.1"
IP="127.0.0.1"
fi
echo "🚀 Starting Laravel on http://$IP:8000"
php artisan serve --host="$IP" --port=8000
@yogithesymbian
yogithesymbian / pi.md
Created February 5, 2025 22:29
pi.md

Ya, benar! Port USB-C di Raspberry Pi 4 Model B yang biasanya untuk power bisa juga digunakan untuk komunikasi data melalui USB Ethernet Gadget Mode.

Jadi, caranya:
Hubungkan kabel USB-C ke USB-C dari port USB-C di Raspberry Pi 4 ke port USB-C di MacBook M1.
✅ Raspberry Pi akan terdeteksi sebagai perangkat jaringan (Ethernet virtual) di MacBook.
✅ Setelah konfigurasi, kamu bisa SSH ke Raspberry Pi langsung via kabel USB-C tanpa perlu WiFi atau adapter tambahan.


Langkah-Langkah Konfigurasi "USB Ethernet Gadget Mode" di Raspberry Pi 4

@yogithesymbian
yogithesymbian / yo_aes_decrypt.rs
Created January 10, 2025 09:53
aes-256-cbc rust
use aes::Aes256;
use block_modes::{BlockMode, Cbc};
use block_modes::block_padding::Pkcs7;
use hex::{decode, encode};
use std::str;
// Define the type for AES-256-CBC
type Aes256Cbc = Cbc<Aes256, Pkcs7>;
fn main() {