Skip to content

Instantly share code, notes, and snippets.

View davidhcefx's full-sized avatar
PRO

davidhcefx davidhcefx

PRO
View GitHub Profile
@davidhcefx
davidhcefx / Brainfuck REPL.md
Last active May 25, 2024 21:56
Brainfuck REPL interpreter
@tadwohlrapp
tadwohlrapp / export-google-podcasts-listening-history-readme.md
Last active July 16, 2024 19:08
How to Export Google Podcasts listening history

How to Export your Google Podcasts listening history

Since Google doesn't provide any method to export or download your listening history, I wanted to find a way to preserve that data for later reference when setting up a new podcast app. I came up with the following script that can be run in your browser console to retrieve and export your Google Podcasts listening history as a CSV file.

NEVER RUN CODE YOU DON'T UNDERSTAND.

Running untrusted code in your browser console can potentially be harmful, so it's important to understand what the code does before executing it. I've included comments in the code to explain its functionality.

Instructions:

@davidhcefx
davidhcefx / Git-學習筆記.md
Last active June 9, 2024 16:59
My Git Learning Notes

Commands

Basic

  • git init: build .git folder
  • git status
  • git add .: select all files
    • --patch: 可以只加部分行數

Commit

  • git commit: will open CLI text editor
@davidhcefx
davidhcefx / Disadvantages of Linux.md
Last active April 14, 2022 01:10
Some disadvantages of Linux I know too well...

rsync

I was using rsync -e "ssh" to transfer files between local and remote computer. If I want to transfer a file from remote to local, the command will be like rsync -av --delete -e "ssh" user@ip:/path/to/fileA /home/user/folder/. One day, however, I thought I could transfer a remote folder /path/to/folderA/ to my home /home/user/. After running the command, I found that it started erasing my home directory! Since Linux has disk encryption by default, I failed to rescue those files eventually ;(

bash_history

My bash history was stored as ~/.bash_history. One day, I was running a huge apt upgrade. It took me plenty of time, so I left it and went to sleep. However, I forgot that my laptop was in battery mode. So eventually, the battery ran out, and my computer experienced an abnormal power off, which resulted in me having a corrupted bash_history. I have no backups, so I lost all my bash history ;(

tee

I just learned how to use tee to app

@davidhcefx
davidhcefx / 逆向工程筆記.md
Last active March 7, 2023 03:49
My notes while playing with reverse engineering.

以下是我自己的逆向工程筆記!有錯還請多多指教XD


    ┌───────── ASCII ─────────┐
    │  30   0    20    SPACE  │
    │  41   A    0d0a  CRLF   │
    │  61   a                 │
    └─────────────────────────┘
@davidhcefx
davidhcefx / My Tmux Config.md
Last active March 1, 2024 11:27
Clipboard Integration, Mouse Selection, Intuition

My Tmux Config

Features

  • More intuitive. (eg. + to create windows, | to split horizontally, Ctrl+C to copy, End to move to end-of-line)
  • System clipboard integration. (support: MacOS, X-Window, Cygwin)
  • Words highlighted by your mouse will stay on the screen; good for explaining stuff to others.

Installation

  1. Install tmux, for example, via apt-get install tmux.
  2. Under home directory, create a file ~/.tmux.conf with the following contents.