Skip to content

Instantly share code, notes, and snippets.

Looking for inspirations

TC Liu liuderchi

Looking for inspirations
Block or report user

Report or block liuderchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
liuderchi / .graphqlconfig.yml
Last active Dec 26, 2018
Project config example for Graphql Playground App ( )
View .graphqlconfig.yml
# For Graphql Playground
# Steps in Toolbar:
# Workspace > New Workspace > select a folder containing this file
# example:
# NOTE for .env
# prepare .env with following content, in same directory as .graphqlconfig.yml
# GH_TOKEN=paste-my-github-token-here
# AIA_TOKEN_LOCAL=paste-aia-token-here
View medium-res-20180519.csv
語法 包含 Non-Enumerable 屬性? 包含原型鍊? Note
'name' in person ✔️ ✔️ 範圍超過自己本身
Object.getOwnPropertyNames(person) ✔️ no
Object.keys(person) no no Enumerable props ONLY
for (let x in person) no ✔️ Enumerable props ONLY
liuderchi / .zshrc
Last active Jan 23, 2018
My `.zshrc` config with installed `oh-my-zsh` and `PowerLevel9k` theme
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/$USER/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See
# ZSH_THEME="robbyrussell"
liuderchi / shuffle.js
Created Jan 22, 2018
shuffle a string in js
View shuffle.js
function shuffle = (str) => str.split('')
.map((a) => ({sort: Math.random(), value: a}))
.sort((a, b) => a.sort - b.sort)
.map((a) => a.value)
# -*- coding: utf-8 -*-
def clean(li):
return map(float, li)
def avg(li):
return sum(clean(li)) / len(li)
def main():
with open('./in.txt', 'r') as input_file, \
liuderchi /
Last active Jan 4, 2018
classical game: Guess Number for 4A0B !
import getpass
def guess_num(guess, ans):
resA, resB = 0, 0
for index, c in enumerate(guess):
findAnsRes = ans.find(c)
if findAnsRes == index:
resA += 1
elif findAnsRes >= 0 :
liuderchi /
Created Dec 25, 2017 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)





liuderchi /
Last active Jan 16, 2018
To Create Labels for your Repo
set -e
# NOTE to create labels for your repo
# to support types from commit message guide (feat, fix, docs, style, refactor, test, chore)
# by hitting GitHub API v3
liuderchi /
Created Nov 23, 2017 — forked from btoone/
A curl tutorial using GitHub's API


An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

liuderchi /
Created Nov 22, 2017 — forked from dergachev/
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

You can’t perform that action at this time.