Skip to content

Instantly share code, notes, and snippets.

@JaosnHsieh
JaosnHsieh / delete-google-photos.js
Created December 30, 2023 00:56
google photos delete all photos day by day
/* 2023.12.29 google photos delete all photos day by day
1. visit google photos
2. replace the buttons css selectors first by manualy right click and see current selectors
3. run the script on console
*/
@JaosnHsieh
JaosnHsieh / intercept-proxy-mitmweb.md
Last active September 13, 2023 20:50
2023-dev-notes

2023.02.03

Intercept proxy mitmweb

mitmweb: proxy server that able to intercept(pause/modify) http requests/responses for web/android/ios development

  1. Install mitmweb and start it by mitmweb -p 3033
  2. Setup proxy on android emulator setting -> proxy and set hostname to your local ip by $ ipconfig and 3033 port
  3. Open browser navigate to mitmweb localhost:8081 and on pause filter type ~u apikeyword
@JaosnHsieh
JaosnHsieh / print.md
Last active May 16, 2023 04:58
save all *.ts and *.tsx code to one file for claude-instant-100k bot to analyze the code

claude-instant-100k

poe.com added a bot that can consume 75,000 words, that can read the code or papers and give suggestions based on it. It's amazing.

print.sh for typescript projects

Code was generated by GPT-4

Save it to print.sh and make it executable chmod +x ./print.sh

@JaosnHsieh
JaosnHsieh / ipatool.md
Created April 21, 2023 22:06
ipatool that able to download ipa file on macos to see more details of a public iOS app
@JaosnHsieh
JaosnHsieh / .vimrc
Last active April 13, 2023 03:17
vscode setting, extension list, user setting, keybinding.json, setting.json ( extension export and import from https://stackoverflow.com/a/49398449/6414615), vimrc vim setting
call pathogen#infect()
let g:ctrlp_custom_ignore = 'node_modules'
map <C-n> :NERDTreeToggle<CR>
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
" background & theme
set background=dark
colorscheme darkblue
2022 Some notes, code snippets, configurations, findings in open souce code.
開場介紹 小謝 樸實社區 接電話
->
大家好 我是來自中壢的小蟹
我今天的主題是 我是一個誠實的人
這故事發生在我高中的時候
有一天我在家中的客廳看電視
放在沙發上的電話突然響了
(手演 凌凌凌凌凌凌~ 接起電話)
接起電話後(測過來演管理員):
管理員:請問你是樸實謝先生嗎?
@JaosnHsieh
JaosnHsieh / recursiveSetTimeout.js
Last active November 30, 2022 07:36
javascript recursive async await setTimeout that not explode call stack. Instead serInterval(), recursive setTimeout waits for previous function call finished then call next.
// https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Timeouts_and_intervals
// https://imgur.com/2zAAVXd
const INTERVAL_MS=100;
setTimeout(async function work() {
const rnd = getRandomInt(100, 200);
console.log(rnd);
await wait(rnd);
setTimeout(work,INTERVAL_MS);
}, 0);
@JaosnHsieh
JaosnHsieh / index.html
Last active September 9, 2022 04:21
Use picture in picture browser API to monitor my back when I use a laptop with a cam
<!-- Runnable examples -->
<!-- https://jsfiddle.net/vatnc7b3/show -->
<!-- https://j2jr9u.csb.app/ -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />