Skip to content

Instantly share code, notes, and snippets.

View yuenu's full-sized avatar

josh Hsu yuenu

View GitHub Profile
@yuenu
yuenu / code-editor-rules.md
Created December 17, 2024 02:01 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@yuenu
yuenu / rename.js
Last active February 16, 2024 08:42
Change the file name of a folder
const fs = require('fs');
const path = require("path");
const FolderName = './zh-CN'
function renameFile(oldPath, newPath, callback) {
fs.rename(oldPath, newPath, (err) => {
if (err) {
console.error(`Error renaming file: ${err}`);
callback(err);
} else {
@yuenu
yuenu / The Technical Interview Cheat Sheet.md
Created June 13, 2023 04:38 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

// 開啟 dev tool
chrome://inspect/#devices
@yuenu
yuenu / build.gradle
Created April 6, 2023 04:25 — forked from naishe/build.gradle
Add Scripts to android/app/build.gradle to pick version code and version name from package.json
// Import JSON parser, place it at the top of the file
import groovy.json.JsonSlurper
// Read package.json and return `version` field
def getVersionFromNpm() {
// Read and parse package.json file from project root
def inputFile = new File("$rootDir/../package.json")
def packageJson = new JsonSlurper().parseText(inputFile.text)