Skip to content

Instantly share code, notes, and snippets.

View nickleefly's full-sized avatar

Xiuyu Li nickleefly

  • Shanghai
View GitHub Profile
@nickleefly
nickleefly / Claude-Heartbeat-README.md
Created January 20, 2026 10:38 — forked from idominikosgr/Claude-Heartbeat-README.md
claude code (cli) 5hour limit reset via bash script or cron

What this dumb-ish script does

  • Periodically sends a minimal request to the claude CLI

  • Purpose:

    • verify connectivity
    • keep the CLI session “warm”
    • potentially advance or trigger the usage/session reset cycle if the backend treats activity as renewal
  • It does not guarantee a reset of any quota or limit

  • It makes no assumptions beyond “a successful request happened”

@nickleefly
nickleefly / ping-sierrachart.py
Created March 11, 2025 10:01
ping sierrachart servers
import subprocess
import re
# List of domains to ping
domain_list = [
"ds3.sierracharts.com",
"ds4.sierracharts.com",
"ds4-2.sierracharts.com",
"ds12.sierracharts.com",
"ds12-2.sierracharts.com",
@nickleefly
nickleefly / ftt.md
Created November 9, 2024 00:53 — forked from jpfl/ftt.md
fast track trading math

i did the math on fast track trading

i can prove ftt and its current rules are offering a mathematically beatable game. for every dollar scott collects in revenue he is taking on about five dollars of statistical net liability. this explains why he simply will not be able to make traders whole and it's snowballing with every account he sells. not only does he need a surge of new signups to pay existing liabilities but the attached debt to each new account is insurmountable. every account scott sells for $100 he's long term statistically losing about $500.

this is the largest negative house edge and the biggest blunder i've seen a company make. the math doesn't work. he will not be able to sustain this and i fear it will end up in a netflix documentary and civil or criminal judgments against scott.

the gist is, with the current rules of making 5% before losing 5% with an end of day trailing drawdown from equity highs, and with the 20% consistency rule, anyone with an equal distant target and stop and 50%

@nickleefly
nickleefly / readme.md
Last active July 16, 2023 07:11
remove matching twitter followers

README

  • This script will check each of the user from user_list if the user in the followers_list it will remove the user from your followers

  • For that first it will block the matching user one by one and then unblock them. If you are following your matching followers, you won't be subscribed to them anymore once you run this job.

  • Install tweepy module using pip. To install tweepy run below command in your terminal.

  • pip install tweepy

@nickleefly
nickleefly / helix-config.toml
Created February 9, 2023 04:01
config/helix/config.toml helix config
theme = "monokai_pro"
[editor]
line-number = "relative"
mouse = false
bufferline = "always"
[editor.cursor-shape]
insert = "bar"
normal = "block"
@nickleefly
nickleefly / stock.py
Created March 9, 2021 07:27
fetch yahoo finance data
from yahoofinancials import YahooFinancials
import pprint
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
@nickleefly
nickleefly / eventemitter.js
Created April 20, 2020 06:42
eventemitter
class MyEventEmitter {
constructor() {
this._events = {};
}
on(name, listener) {
if (!this._events[name]) {
this._events[name] = [];
}
@nickleefly
nickleefly / acme.md
Last active December 26, 2022 14:09
shadowsocks v2ray-plugin nginx with docker-compose
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Email="xxxx@sss.com"
~/.acme.sh/acme.sh --issue -d 'example.com' -d '*.example.com' --dns dns_cf -k ec-256
~/.acme.sh/acme.sh --issue --dns dns_cf -d subdomain.example.com
@nickleefly
nickleefly / Freenode IRC.md
Created May 21, 2019 09:02 — forked from yeyewangwang/Freenode IRC.md
Freenode Nickserv Commands

Connect

/server chat.freenode.net

Nick

@nickleefly
nickleefly / google-play.md
Last active January 10, 2019 03:24
从服务器检索信息时出错 [DF-DFERH-01]

login to openwrt ssh

sed -i '$a conf-dir=/etc/dnsmasq.d' /etc/dnsmasq.conf
mkdir /etc/dnsmasq.d/
cat >>/etc/dnsmasq.d/custom.conf<<EOF
address=/services.googleapis.cn/216.58.197.195
EOF

restart dnsmasq