Skip to content

Instantly share code, notes, and snippets.

View feihong's full-sized avatar

Feihong Hsu feihong

View GitHub Profile
@feihong
feihong / convert-epub-to-cbz.py
Created December 25, 2021 20:52
Convert kepub.epub file to cbz
from pathlib import Path
import zipfile
import sys
import xml.etree.ElementTree
from typing import List
if len(sys.argv) < 2:
print('Please provide directory')
sys.exit(0)
else:
@feihong
feihong / LICENSE
Created January 14, 2018 05:54
Feihong's Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@feihong
feihong / [email protected]
Last active June 13, 2017 23:32 — forked from pixeltrix/postgis21.rb
Formula for installing postgis 2.1 with the legacy [email protected] formula
class PostgisAT21 < Formula
desc "Adds support for geographic objects to PostgreSQL"
homepage "http://postgis.net"
url "http://pkgs.fedoraproject.org/repo/pkgs/postgis/postgis-2.1.7.tar.gz/f35307c201caf04e7028f95b649cf6e7/postgis-2.1.7.tar.gz"
sha256 "00ab79a3f609d7ea458f6fc358032ad059cb720baf88285243d6436a597a7ec2"
revision 1
def pour_bottle?
# Postgres extensions must live in the Postgres prefix, which precludes
# bottling: https://github.com/Homebrew/homebrew/issues/10247
@feihong
feihong / lyrics.txt
Last active October 11, 2016 03:57
音乐响起
每当音乐响起
Every time the music sounds
总是身不由己
I can never hold back
走进梦幻的世界
Enter an illusory dream world
一切变得很神奇
Everything becomes magical
每当音乐响起
@feihong
feihong / swift_snippets.md
Last active October 24, 2016 21:21
Swift snippets

Print the names of all playlists:

import MediaPlayer

func printPlaylists() {
    let query = MPMediaQuery.playlistsQuery()
    print("Inside printPlaylists()")
    guard let result = query.collections else {return}
 print("Number of playlists: ", result.count)
@feihong
feihong / ffmpeg-recipes.md
Created December 31, 2015 00:03
ffmpeg recipes

Copy the input video from 14:43 to 16:55 and output it to a file called cut.mp4

ffmpeg -i movie.mp4 -ss 00:14:43 -to 16:55  -acodec copy -vcodec copy -async 1 cut.mp4
@feihong
feihong / phonegap-quickstart.md
Last active December 15, 2015 20:08
PhoneGap Quickstart
@feihong
feihong / snippets.cson
Created December 5, 2015 19:39
Atom snippets
'.source.python':
'pdb':
'prefix': 'pdb'
'body': 'import ipdb; ipdb.set_trace()'
'.source.python':
'ipython':
'prefix': 'ipython'
'body': 'import IPython; IPython.embed()'
@feihong
feihong / info.md
Last active November 8, 2015 21:09
Info for ChickTech Mobile App Tutorial
@feihong
feihong / git-cheatsheet.md
Last active November 21, 2015 00:50
Git cheatsheet

Undo last commit:

git reset --soft HEAD~1 

Download just the source code of a project:

curl -sL https://github.com/feihong/tutorial-boilerplate/archive/master.tar.gz | tar xz