Skip to content

Instantly share code, notes, and snippets.

Avatar
🦀
求同存异

David Wong mimoo

🦀
求同存异
View GitHub Profile
@mimoo
mimoo / ecdh.md
Last active Mar 31, 2021
ECDH security considerations
View ecdh.md

RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms:

The security level of an elliptic curve cryptosystem is determined by the cryptanalytic algorithm that is the least expensive for an attacker to implement. There are several algorithms to consider.

prime-order: shank's baby step giant step, pollard rho, pollard kangaroo/lambda,

non-prime order: Pohlig-Hellman

The order m of the elliptic curve is divisible by the order n of the group associated with the generator; that is, for each elliptic curve group, m = n * c for some number c. The number c is called the "cofactor". [...] It is possible and desirable to use a cofactor equal to 1.

@mimoo
mimoo / hawaii_travel.md
Created Mar 17, 2021
You're traveling to some hawaii island from hawaii? And you have kaiser california? And you have to do a covid test?
View hawaii_travel.md
  • just call kaiser whenever (at least 72h before the flight)
  • tell them you have an account with kaiser north california but you need a test in oahu for travelling on date X (they need it to schedule the test at most 72h in advance)
  • they'll tell you OK, this is the address, go there on this date at this hour (worst case: it doesn't seem to be a big deal if you show up in advance or later)
  • show up to a kaiser hospital before your flight and ask them if they have the result (they should be able to give you a paper copy)
  • take a picture of the result, compress the pic, transform to pdf, upload to the same site you used to fly to oahu
@mimoo
mimoo / README.md
Created Mar 8, 2021
Flamegraph of your asciidoc books
View README.md

I wrote a very primitive script to produce a flamegraph out of a number of asciidoc files. See this blog post for some idea of the result.

flamegraph

WARNING: It's heavily taylored to my own setup, so not sure it'll work directly with yours, or you might have some customization to do. (If there's enough interest I could do a more general script / Dockerfile.)

How to use?

@mimoo
mimoo / waikiki.md
Last active Mar 22, 2021
Hawaii Waikiki Good Spots
View waikiki.md

Waikiki <3

Markets

Every wednesday afternoon (4pm-7pm) and every saturday morning (9am-11am) there are two uber cool markets that serve lots of food! During our time in Waikiki we went there almost every single time. Here's what you HAVE to try:

Wednesday Honolulu Farmer's market:

@mimoo
mimoo / finance.md
Last active Feb 15, 2021
What happens when you insert/swipe your bank card in a point of sale?
View finance.md

Developers have this infamous interview question "what happens when you type google.com into your browser's address box and press enter?"

Let's answer a set of similar questions, but in the money space :$

what happens when you insert or swipe your bank card in a point of sale?

  1. The point of sale (PoS) prompts for your PIN, or read information in your magnetic stripe or via RFID (touchless payment)
  2. It then needs to ask for an authorization to your bank (issuing bank, as they "issued" the credit or debit card).
  3. The PoS uses the internet to talk to its acquiring bank (the one that acquired the business, asking them if they wanted to support bank cards and providing the PoS).
  4. The acquiring bank talks to the VISA/Mastercard network.
@mimoo
mimoo / auto.md
Last active Dec 14, 2020
Auto Insurance for no travelers in the US
View auto.md

Auto Insurance for no travelers in the US

Context:

  • I'm airbnb hopping, changing address every month, and have no permanent address anymore.
  • My current car insurance (Metromile) noticed this and dropped me (they require you to park your car at least 10 months a year in the same zip code).
  • I can't find an auto insurance because I don't have a permanent address, they don't want me.
  • Using a friend's address or a PO box seems to be fraud insurance, which can lead the insurer to deny me if I get into an accident and need them to pay for something.
  • I'm in California
@mimoo
mimoo / top.md
Last active Dec 11, 2020
top 100 movies
View top.md

Sci-Fi:

  • The Matrix
  • Minority Report
  • Oblivion
  • Interstellar
  • Gravity
  • The Platform
  • Inception
  • Interstellar
@mimoo
mimoo / get_sections.py
Created Dec 5, 2020
script to print out sections of `.adoc` files, assuming they all start with `1_something.adoc`, `2_something_else.adoc`, etc.
View get_sections.py
import glob
import re
import os
def count_equal(line):
res = 0
for i in range(10):
if line[i] == "=":
res += 1
else:
@mimoo
mimoo / timeline.md
Last active Nov 24, 2020
quantum timeline
View timeline.md

picked interesting elements from https://en.wikipedia.org/wiki/Timeline_of_quantum_computing_and_communication

  • 1980 - Paul Benioff describes the first quantum mechanical model of a computer. In this work, Benioff showed that a computer could operate under the laws of quantum mechanics by describing a Schrödinger equation description of Turing machines, laying a foundation for further work in quantum computing. The paper [5] was submitted in June 1979 and published in April 1980.
  • 1980 - At the First Conference on the Physics of Computation, held at MIT in May, Paul Benioff and Richard Feynman give talks on quantum computing. Benioff's built on his earlier 1980 work showing that a computer can operate under the laws of quantum mechanics. The talk was titled “Quantum mechanical Hamiltonian models of discrete processes that erase their own histories: application to Turing machines”.[8] In Feynman's talk, he observed that it appeared to be impossible to efficiently simulate an evolution of a quantum system on
@mimoo
mimoo / quantum.md
Last active Sep 10, 2020
quantum computers opinions
View quantum.md

physicists

2018-11-15 - Mikhail Dyakonov - The Case Against Quantum Computing

Could we ever learn to control the more than 10300 continuously variable parameters defining the quantum state of such a system? My answer is simple. No, never.

2015 - Bela Bauer of StationQ Research said in a joint statement with five other researchers

Recent improvements in control of quantum systems make it seem feasible to finally build a quantum computer within a decade.”