Skip to content

Instantly share code, notes, and snippets.

View Ronin1702's full-sized avatar

KodeBear Ronin1702

View GitHub Profile
@Ronin1702
Ronin1702 / Environment_Variables_Frontend_vs_Backend.md
Created October 29, 2023 13:03
Environment Variables in Frontend vs Backend

Environment Variables in Frontend vs Backend

Environment variables are a way to store configuration settings for your applications. They are key-value pairs that are outside of the application code. Although environment variables work in a similar fashion in both frontend and backend applications, there are some specific considerations for each.

Table of Contents

  1. Backend Environment Variables
@Ronin1702
Ronin1702 / AccessingLocalhostfromiPhone.md
Last active September 28, 2025 17:34
Accessing Localhost from iPhone

Accessing Localhost from iPhone

If you are developing a web application and want to test it on your iPhone, you can access your localhost development server directly from your iPhone. Here's how to do it:

Prerequisites

  • Ensure both your development machine and iPhone are connected to the same local network (e.g., the same WiFi).

1. Find Your Local IP Address

@Ronin1702
Ronin1702 / vite-gh-pages.md
Last active September 26, 2023 12:47
Deploy Vite App to GitHub Pages

Static Deployment From Vite to GH Pages

Configure vite.config.js and package.json file.

  1. Go to your vite.config.js file. And add your base url to it.
  • c88yz7o768blhaipaioy
  • If your repo name is Kool-Vite, then your bsae URL is /Kool-Vite/.
  1. Go to your root package.json file. Add homepage and deploy scripts. ```json "homepage": "https://yourGitHubUserName.github.io/repoName/",
@Ronin1702
Ronin1702 / package.json-update.md
Last active September 26, 2023 12:12
Update All dependencies in `package.json` at once

Update all dependencies in package.json at once

Install npm-check-update package.

-g is a globale tag, I recommend install this globally, and if you don't want to use this package gloabbly, take this tag off

npm i -g npm-check-update

Get update list and install

@Ronin1702
Ronin1702 / brew$PATH.md
Last active September 14, 2023 01:30
Switching Shell EXPORT path

Switch Homebrew export path between Intel and Apple Silicon

As a developer, you may or may not have set up VMs (Virtual Machines). Developing cross platform we will need to tell our shell such as brew, bash, powershell, or zsh to which path they shall export the command to. So that the shell can translate what you wanted to do from the command line to a language that your machine can understand and execute.

Check Which Shell is being used

For most developers we use the good old Bash instead of zsh, both of them works. To check which shell you're using:

@Ronin1702
Ronin1702 / remove-node_modules.md
Last active September 26, 2023 11:45
Delete `node_modules` folder from your directory

Remove node_modules || package-lock.json || dist Folders

Remove node_modules:

  • In GitBash shell, copy and paste the commeand below in the terminal under your destinated directory:

    find . | grep /node_modules$ | grep -v /node_modules/ | xargs rm -fR
@Ronin1702
Ronin1702 / xcode-uninstall.sh
Created September 3, 2023 10:50 — forked from oxlb/xcode-uninstall.sh
SH file to uninstall Xcode from MacOS
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
@Ronin1702
Ronin1702 / pc-bash-git-authentication.md
Last active September 3, 2023 08:24
PC Bash Shell Authentication for `Git` commands

Having to enter passwords for each git pull and git push command is very time consuming when you use Git Bash on PC

PowerShell on PC does not have this problem where the user set the running environment for SSH Agent:

Start-Service ssh-agent
ssh-add "$env:USERPROFILE\.ssh\id_ed25519"
  • When I use the Git Bash program on PC, though I have set up SSH key correctly, each time I must type in password when I git pull or git push.
@Ronin1702
Ronin1702 / markdown-cheat-sheet.md
Last active September 3, 2023 08:15
Markdown Cheat Sheet

Markdown Cheat Sheet

View this .mdfile in Raw mode to see the codes of markdown format.

Thanks for visiting The Markdown Guide!

This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic syntax and extended syntax.

Basic Syntax

@Ronin1702
Ronin1702 / GPG-Key.md
Last active September 3, 2023 05:44
GitHub Commit Verification

GitHub Commit Verification

  • On GitHub, when looking at the Commits in a repo, have you ever noticed the unverified and verified tags?
  • Screenshot 2023-09-01 at 3 43 57 AM
  • Screenshot 2023-09-01 at 3 41 27 AM
  • Screenshot 2023-09-01 at 3 45 55 AM
  • Screenshot 2023-09-01 at 3 46 40 AM