Skip to content

Instantly share code, notes, and snippets.

View SimpleZn's full-sized avatar

Simple.Z.N SimpleZn

  • Shang Hai
View GitHub Profile
@SimpleZn
SimpleZn / scp_upload_to_server.txt
Last active July 14, 2025 02:41
upload local files to remote server by using SCP protocol
scp -r /Users/trace/Documents/GitHub/curry-haven/dist/spa/* root@your-ip:/var/www/static-site
SCP: The secure copy command, which is used for file transfer via the SSH protocol.
-r: for `Recursive`
/Users/trace/Documents/GitHub/curry-haven/dist/spa/:
Local source path: The GitHub project directory of user trace under the MacOS system
/* indicates copying all files and subdirectories in the directory (but does not include the spa directory itself)
@SimpleZn
SimpleZn / set_up_your_API_Key.md
Last active June 5, 2025 05:10
Set up your API key locally as an environment variable

MacOS - zsh

https://ai.google.dev/gemini-api/docs/api-key#macos---zsh

For initial testing, you can hard code an API key, but this should only be temporary since it is not secure. The rest of this section goes through how to set up your API key locally as an environment variable with different operating systems.

Zsh is a common Linux and macOS terminal configuration. You can check if you have a configuration file for it by running the following command:

~/.zshrc
@SimpleZn
SimpleZn / bulk_delete_repos.md
Last active June 5, 2025 05:09 — forked from mrkpatchaa/README.md
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.