Skip to content

Instantly share code, notes, and snippets.

View liuderchi's full-sized avatar
🔍
Looking for inspirations

TC Liu liuderchi

🔍
Looking for inspirations
View GitHub Profile
@dsaiztc
dsaiztc / excel.py
Last active November 4, 2015 03:30
Excel files Python management. http://www.python-excel.org/
import xlrd
datafile = "my_file.xls"
workbook = xlrd.open_workbook(datafile)
sheet = workbook.sheet_by_index(0)
data = [[sheet.cell_value(r, col)
for col in range(sheet.ncols)]
for r in range(sheet.nrows)]
@arielpontes
arielpontes / webvtt_notes.md
Last active November 10, 2015 23:44
WebVTT notes

WebVTT is a W3C standard for displaying timed text in HTML5. Its specification is currently (as of May 2015) in draft stage and therefore not all features are implemented by major players, especially when it comes to positioning. Since there are no recent summaries of WebVTT positioning online and the specification cannot be used by any sane person for quick reference, I'll make a short summary here.

#WebVTT Positioning

Let's start with an example. This file contains the main positioning parameters supported by WebVTT:

WEBVTT

00:00:01.000 --> 00:00:05.000 position:75% align:middle
@nullren
nullren / trans_srt.py
Created March 24, 2013 07:48
python script to translate my chinese srt files into english!
#!/usr/bin/python3
import sys
import re
import json
import html.parser
import urllib.parse as p
import urllib.request as r

Draw Diagram using Markdown

  • markdown preview enhanced is a Atom package

    • preview markdown in Atom editor on the fly
    • allow you to draw flow chart using power of mermaid
    • you can export the document in html or pdf
  • mermaid let you draw diagram like writing markdown

    • supporting lots of diagram
@jasonphillips
jasonphillips / config.js
Last active June 24, 2018 13:10
Jupyter NodeJS: HTML Output (and React Demonstration)
module.exports = {
extensions: {
// clojurescript: require('./ext/clojurescript'),
clojure: require('./build/ext/clojure'),
clojurescript: require('./build/ext/clojurescript'),
coffee: require('./build/ext/coffee'),
babel: require('./build/ext/babel'),
html: require('./build/ext/html')
}
}
@niieani
niieani / flowtype-vs-typescript.md
Last active November 27, 2018 09:10
Differences between Flowtype and TypeScript
@liuderchi
liuderchi / .graphqlconfig.yml
Last active August 18, 2019 16:52
Project config example for Graphql Playground App ( https://github.com/prisma/graphql-playground )
# For Graphql Playground
# Steps in Toolbar:
# Workspace > New Workspace > select a folder containing this file
#
# example: https://github.com/prisma/graphql-playground/pull/757/files
#
# 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
@peterpme
peterpme / styles.less
Last active June 23, 2021 06:24
Operator Mono and Fira Code working together in Atom
// ...
atom-workspace,
atom-text-editor {
font-family: "Fira Code";
text-rendering: optimizeLegibility;
font-size: 17px;
font-weight: 400;
line-height: 1.8;
}
@liuderchi
liuderchi / rename_author_of_commits.md
Created September 23, 2016 03:03
git rename author info of commit

setup author info of past commits

  • $ git rebase -i {{base_commit|--root}}
  • edit all 'pick' to 'edit' then save
  • do following for each commit:
    • $ git commit --amend --author="Author-Name <email@address.com>"
    • $ git rebase --continue

setup author info of future commits