Skip to content

Instantly share code, notes, and snippets.

View zwithz's full-sized avatar
:bowtie:
meow~

Zack Zhou zwithz

:bowtie:
meow~
View GitHub Profile
let collection = ZoteroPane.getSelectedCollection();
let itemIDs = collection.getChildItems(true);
const fieldName = 'extra'
const fieldID = Zotero.ItemFields.getID(fieldName);
function extractCodeURL(data) {
if (!data || data.length == 0) return "";
if (data[0].repository && data[0].repository.url) return data[0].repository.url;
return "";
@zwithz
zwithz / latest-protobuf-ubuntu-18-04.md
Created November 17, 2021 04:48 — forked from diegopacheco/latest-protobuf-ubuntu-18-04.md
How to Install Latest Protobuf on Ubuntu 18.04
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
make
make check
sudo make install
sudo ldconfig
@zwithz
zwithz / extract.py
Created April 19, 2021 11:10 — forked from geohot/extract.py
extract imagenet ILSVRC2012 recursive tar
# extract ILSVRC2012 without killing your SSD
import tarfile
import os
import sys
def mkdir(x):
try:
os.makedirs(x)
except OSError, e:
@zwithz
zwithz / H36M.ipynb
Created February 23, 2021 08:53 — forked from nulledge/H36M.ipynb
Description for Human3.6M dataset.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zwithz
zwithz / custom-style-for-notion.js
Created November 16, 2020 06:14
A TamperMonkey script - custom style for notion
// ==UserScript==
// @name custom-style-for-notion
// @version 0.1
// @author zwithz
// @match https://www.notion.so/zwithz/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
@zwithz
zwithz / notion.css
Last active November 16, 2020 08:43
Custom style for notion.
div.notion-page-content div {
line-height: 1.9rem !important;
}
div.notion-page-content div.notion-record-icon {
margin-bottom: 8px !important;
}
div {
font-family: Lyon-Text, Georgia, YuMincho, "Yu Mincho", "Songti SC", SimSun, "Nanum Myeongjo", NanumMyeongjo, Batang, serif;
@zwithz
zwithz / flomo-evergreen-theme-for-tampermonkey.js
Last active September 5, 2020 04:16
Flomo evergreen theme for Tampermonkey
// ==UserScript==
// @name flomo-evergreen-theme
// @version 0.5
// @author zwithz
// @match https://flomo.app/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
h3 {
color: #000 !important;
}
.el-tooltip {
border-radius: 5px !important;
}
div.user {
justify-content: space-between;
@zwithz
zwithz / GPG and git on macOS.md
Created September 1, 2020 10:06 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: