Skip to content

Instantly share code, notes, and snippets.

@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');

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 / 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
-----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 / 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 \
@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 / patch.txt
Created July 26, 2017 06:07
A patch for automake to compile it with later versions of Perl
--- automake.in 2015-01-06 03:25:55.000000000 +0800
+++ automake.in.patched 2017-07-26 13:58:07.086205701 +0800
@@ -3878,7 +3878,7 @@
sub substitute_ac_subst_variables
{
my ($text) = @_;
- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+ $text =~ s/\$\{([^ \t=:+{}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;
return $text;
}
@xywei
xywei / setup.sh
Created June 27, 2017 04:08
Setup texmacs mirror
# Fetch svn directory
mkdir texmacs
cd texmacs
git svn init -t tags -b branches -T trunk svn://svn.savannah.gnu.org/texmacs
git svn fetch
@xywei
xywei / update_texmacs.sh
Created June 22, 2017 00:44
Update TeXmacs Git mirror
#!/bin/sh
# to create the repo, see https://gist.github.com/ticean/1556967
REPO_PATH=$HOME/texmacs
# master branch
cd $REPO_PATH
git checkout master
git svn fetch
git svn rebase
@xywei
xywei / gdbinit
Created June 3, 2017 16:12 — forked from CocoaBeans/gdbinit
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net