Skip to content

Instantly share code, notes, and snippets.

View lemontv's full-sized avatar
🦉
Night owl

Shiming Chen lemontv

🦉
Night owl
View GitHub Profile
@lemontv
lemontv / keybase.md
Created May 6, 2024 03:18
Keybase proof

Keybase proof

I hereby claim:

  • I am lemontv on github.
  • I am lemontv (https://keybase.io/lemontv) on keybase.
  • I have a public key ASBOm58ybRaCRNTyqZaeKIwkAMJ8fSB0dD65qWZLPGaA6wo

To claim this, I am signing this object:

@lemontv
lemontv / libsk-libfido2_BUILD_FROM_OPENSSH.md
Created April 23, 2024 02:59 — forked from thelastlin/libsk-libfido2_BUILD_FROM_OPENSSH.md
Build libsk-libfido2.so from OpenSSH-portable

Tested on macOS Sonoma Developer beta 2 (23A5276g)

Build libsk-libfido2.so

Prerequisite

  1. Download openssh-portable source code, install libcrypto, libfido2;
  2. Configure openssh-portable build system by ./configure # [options].

Apply patch

@lemontv
lemontv / YubikeyOTP.sh
Created August 1, 2022 23:48
Get Yubikey OTP from NFC reader
#!/bin/sh
# Get avaialbel reader
reader=$(opensc-tool --list-reader | grep 'Yes' | awk '{ print $1 }')
# Get Yubikey OTP
opensc-tool -c default -r "$reader" -s 00:A4:04:00:07:D2:76:00:00:85:01:01 -s 00:A4:00:0C:02:E1:04 -s 00:B0:00:00:00 | grep -Ev 'Sending|Received' | awk '{ print substr($0, 49) }' | tr -d '\n' | awk '{ print substr($0, 26) }'
@lemontv
lemontv / cloudflare-ddns-update.sh
Created February 1, 2022 01:18 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@lemontv
lemontv / restart-gpg-agent.sh
Created October 4, 2021 02:12 — forked from raabf/restart-gpg-agent.sh
restarts the gpg-agent. often necessary because it is so faulty program.
#!/bin/bash
# restarts the gpg-agent
# often necessary because it is so faulty program
killall gpg-agent || true
gpg-agent --daemon
@lemontv
lemontv / MFI
Created May 30, 2020 19:27
MFI investment
year 2008
MFI rate -12.061047217051657
Avg rate -35.899563515244445
Alpha 23.838516298192786
================================
###Year: 2008 ###
Ticker Current Prices Next Prices MFI Inc Rate
Ticker
TJX TJX 7.1125 5.1600 2.905887 -27.451670
NFLX NFLX 3.5286 4.4586 2.514230 26.356062