Skip to content

Instantly share code, notes, and snippets.

{
"last_update": 1593626766189,
"entries": [
{
"country": "China",
"city": "HeNan",
"start_date": "1992",
"end_date": "1993",
"desc": "",
"items": [
We couldn’t find that file to show.

Keybase proof

I hereby claim:

  • I am taoalpha on github.
  • I am taoalpha (https://keybase.io/taoalpha) on keybase.
  • I have a public key whose fingerprint is D228 26EC DB47 884B A673 0720 8D87 084B 0EBF 2626

To claim this, I am signing this object:

@taoalpha
taoalpha / init.sh
Last active September 28, 2017 13:17
osx initial script
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `init.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# Step 1: Update the OS and Install Xcode Tools #
@taoalpha
taoalpha / deleteKindleItems.js
Last active September 12, 2016 22:50
delete kindle items
// bulk deletion for kindle items
function deleteKindleItems() {
if ($('.contentListIcon_myx').length > 0) {
// select first 10
$('.contentListIcon_myx').map(function(i,v){ if (i < 10) {$(v).click()}else{return}});
// delete
$('#contentAction_delete_myx').click();
// yes to delete
import requests
import re,os
import json
import xml.etree.ElementTree as ET
import string
import datetime
import zipfile
# name mapper for mapping pinyin with name
nameMap = {
@taoalpha
taoalpha / my_configs.vim
Last active April 27, 2016 00:26
customized config for vim
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" show ruler and number
set ruler
set nu
" modifiable
set modifiable
@taoalpha
taoalpha / list.js
Created January 23, 2016 04:53
array-base list and linkedlist-base list, double linked list based list, three in one :)
"use strict"
/*
* Data Structure of Javascript
* 1. List
* 2. Stack
* 3. Queue
* 4. LinkedList
* 5. Dictionary
* 6. Hashing
* 7. Set
@taoalpha
taoalpha / sorting-algorithms.js
Last active September 6, 2016 09:50
Popular sorting algorithms in JS
"use strict"
// Popular sorting algorithm in javascript
// 1. insertionSort
// 2. selectionSort
// 3. bubbleSort
// 4. mergeSort
// 5. quickSort
// 6. bucketSort
// 7. radixSort
@taoalpha
taoalpha / testcase4bplustree.java
Last active October 5, 2015 19:30
testcases for b plus tree
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Collections;
import org.junit.Test;
public class Tests {
// add some nodes, see if it comes out right, delete one, see if it's right