Skip to content

Instantly share code, notes, and snippets.

View davidhcefx's full-sized avatar
PRO

davidhcefx davidhcefx

PRO
View GitHub Profile
@davidhcefx
davidhcefx / How to Search Facebook Messenger by Date.md
Last active October 26, 2024 15:49
Browser script to search Facebook Messenger message by date

How to Search Facebook Messenger by Date

Answered in this thread

Until now, Facebook Messenger still doesn't offer an option to filter messages within a specific date range. The only option left is to scroll manually through the entire message thread, either by pressing Page up or Ctrl + Home, which is very very time-consuming.

So, I wrote a script to automate all the tedious stuff!

  1. In Chrome, press Cmd+Option+C (or Ctrl+Shift+C on Windows) and click on a "timestamp message" in Messenger.
  2. A "timestamp message" is the timestamp that are sometimes inserted at the top of the messages.
@davidhcefx
davidhcefx / 每年拿薪水固定比例的投資報酬.ipynb
Last active July 20, 2024 21:16
如果每年固定撥出一定比例的薪水,拿來存款投資,考量薪資成長率的情況下總共會有多少資金?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidhcefx
davidhcefx / Brainfuck REPL.md
Last active May 25, 2024 21:56
Brainfuck REPL interpreter
@davidhcefx
davidhcefx / Recommended Sublime Packages.md
Last active January 27, 2024 14:03
My List of Recommended Sublime Packages
@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 / Offline Random Password Generator.md
Last active April 20, 2022 22:07
[REAL] Offline Random Password Generator in Python3

Offline Random Password Generator

There are plenty of ONLINE websites that claimed to be generating your password OFFLINE. This sounds quite absurd to me, as there are no way to tell if they are collecting your data or not, unless you look into their Javascript code or something. At the end of the day, generating one's password using someone else's website just doesn't make sense. Therefore, this code is meant to be run locally and is easy to understand, which is essential to provide confidence that it is safe.

Usage

python3 random_password_generator.py
@davidhcefx
davidhcefx / Nano's Rainbow Color Testing.md
Last active March 18, 2022 21:39
An overview of 256 color supported by nano config file

Nano's Rainbow Color Testing

An overview of 256 color supported by nano config file.

Instruction

  1. Download the following file rainbow.nanorc.
  2. Run nano -f /path/to/this/file /path/to/this/file

Note that for nano with version < 6.0, only 16 colors would be highlighted.

Prettydot - Human readable dot graph language for CFG

Background

[Dot][] is a graph description language in extensions .dot or .gv, and can be read by programs such as Graphviz ([try it online][]). However, it's syntax is too complicated for the goal of generating a simple control-flow graph, and is not very well human readable. Therefore, I defined a new language, prettydot, for this purpose.

Agila Monokai Extended Brown.tmTheme

I am a big fan of Monokai theme and colors. This color scheme is basically the same as Agila's Monokai Extended color scheme, except that all gray backgrounds have been replaced with a nice looking brown one! :) (plus issue #43 been fixed)

Screenshot

Agila Monokai Extended Brown

Note that I only demonstrated the Color Scheme, not the Theme. The theme I used was Spacegray Eighties.

@davidhcefx
davidhcefx / Make CTFd Display Custom Fields for In-class Projects.md
Last active February 14, 2023 15:59
When using CTFd for in-class projects, you might want to display additional info such as "Is this user a course student?".