Skip to content

Instantly share code, notes, and snippets.

View mckelvin's full-sized avatar

GitHubLeakedPAN, GitHubLeakedMyautsai mckelvin

View GitHub Profile
#!/bin/sh
ag -0 -l $1 | xargs -0 perl -pi -e "s/$1/$2/g"
@mckelvin
mckelvin / accounting-ch3.beancount
Last active April 11, 2021 09:02
使用 beancount 表示肖星《财务分析与决策课程》 第三章中提及的例子
; 肖星 - 《财务分析与决策课程》
; <https://open.163.com/newview/movie/free?pid=MDPKDHH4O&mid=MDR7K8231>
; 3.1企业设立、筹建中的经济活动与财务报表
; ~
; 3.6所得税、利润、利润分配与财务报表
option "title" "模拟公司"
option "operating_currency" "CNY"
Open 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
E F F#/Gb G G#/Ab A A#/Bb B C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B C C#/Db D D#/Eb E
B C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B
G G#/Ab A A#/Bb B C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B C C#/Db D D#/Eb E F F#/Gb G
D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B C C#/Db D D#/Eb E F
# BWG_VE_ID=<TODO>
# BWG_API_KEY=<TODO>
# */10 * * * * /usr/bin/python3 /usr/local/bin/bwg-migrate.py >> /var/log/bwg-migrate.log 2>&1
import os
import random
import logging
import requests
pushtag #coffee-2020
2020-01-01 * "预付未来1年的咖啡"
Assets:Saving:CN:CMB -12*4*30 CNY
Income:Wool:CoffeeShopX -200 CNY
Assets:PrePayments:CoffeeShopX
2020-01-01 # "每周一杯咖啡 [WEEKLY UNTIL 2020-12-01]"
Expenses:Food:Coffee 30 CNY
Assets:PrePayments:CoffeeShopX
poptag #coffee-2020
// ==UserScript==
// @name No fixed nav in xueqiu.com
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://xueqiu.com/*
// @grant GM_addStyle
// ==/UserScript==
#!/usr/bin/env python3
import os
from flask import Flask, request, redirect, url_for
from werkzeug.utils import secure_filename
app = Flask(__name__)
@app.route('/')
def home():
return """
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mckelvin
mckelvin / Makefile
Created January 30, 2019 15:17
Generate self-signed certs for mitmproxy on macOS
# Generate self-signed certificates for mitmproxy:
# mitmproxy-ca.pem
# mitmproxy-ca-cert.pem
# mitmproxy-dhparam.pem
#
# Usage:
# Put this make file in ~/.mitmproxy/Makfile and run make
all: mitmproxy-dhparam.pem mitmproxy-ca.pem mitmproxy-ca-cert.pem
"""
352 Air PM2.5 采集仪指标采集
"""
import time
import struct
import socket
UDP_IP = "0.0.0.0"
UDP_PORT = 11530