Skip to content

Instantly share code, notes, and snippets.

@xywei
xywei / sc.py
Last active October 30, 2017 15:45
A Scraper for Shareholding Data (Shanghai)
#!/bin/env python3
"""
Stock Connect Northbound Shareholding Search By Date - Shanghai Connect
"""
__copyright__ = "Copyright (C) 2017 Xiaoyu Wei"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@xywei
xywei / rofiunicode
Last active January 12, 2019 16:16
rofiunicode
#!/bin/sh
# Give dmenu list of all unicode characters to copy.
# Shows the selected character in dunst if running.
# Must have xclip installed to even show menu.
xclip -h >/dev/null || exit
chosen=$(grep -v "#" ~/.emoji | rofi -dmenu \
-location 1 -width 100 \
-lines 2 -line-margin 0 -line-padding 1 \
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.4.10
Comment: https://openpgpjs.org
xsBNBFrNtsIBCADnDat+qSZRidCnyqciUivZiykgDlyLFmyEThFQ7iTwqbXH
OQgenLQd0J65tZOBgmQrw8HlDj/vXCZRhKvwFNTkcBDyO25IEFDQ3Qq0vrrR
lQUVICRufG9bXqwY1l2yOCErR1UJkevhgQV13s+FkTHMeano1ErVvZLJnuTX
cv5/xLU78WQ0vxs3Vm0EgKKmbaF7ire5ikf/uICMiY/yDfjFFyuxoO4rBuSa
rNaQrU9nW39nYNAJFckh9lrQJKWBluZIUkrpgM/GPXxsxf//pIcEKqUWN3TC
BdYzNhZEOWtEr6C0NeMDp6T9pVRy7vjqg7mBBVQ/ZsBX69kZwEjrfzT5ABEB
@xywei
xywei / git-io-custom-url.md
Created April 28, 2019 04:20 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@xywei
xywei / upload.js
Created May 13, 2024 15:13
Better upload for box-cli
// Better upload for box-cli (https://github.com/box/boxcli)
// - skip existing folders/files to let you resume interrupted uploads
// - parallel uploads
//
// Use as a drop-in replacement of src/commands/folders/upload.js
'use strict';
const BoxCommand = require('../../box-command');
const { flags } = require('@oclif/command');