Skip to content

Instantly share code, notes, and snippets.

@githubutilities
githubutilities / analyse-existing-code.md
Last active September 6, 2015 09:39
Analyse Existing Code
@githubutilities
githubutilities / pptp-linode.md
Created September 3, 2015 11:07
pptp-linode
@githubutilities
githubutilities / utf8mb4-mysql.md
Created September 3, 2015 08:14
utf8mb4 mysql

utf8mb4 support in mysql

utf8 in mysql only support a small amount of character set which occupies about one to three bytes, while utf8mb4 uses 4 bytes to store which can support any character that defined by unicode.

@githubutilities
githubutilities / Python-Django-MySQL.md
Created September 3, 2015 07:04
Python Django MySQL

Python Environment Setup

#which also install `pip`
brew install python

#.bash_profile
export PATH=/usr/local/bin:$PATH
@githubutilities
githubutilities / Mach-O Binary.md
Last active August 31, 2015 14:00
Mach-O Binary

Mach-O Binary

Since universal binary is basically archiving multible binary into one file and wpsoffice contains binary for armv7 and arm64 architectures, with app slicing feature of iOS9, the size of WPSOffice in iOS may reduce in half.

# header
otool -v -h wpsoffice

# Load
otool -v -l wpsoffice
@githubutilities
githubutilities / Video-Compression.md
Created August 31, 2015 12:08
Compressing Video

Video Compression Using ffmpeg

ffmpeg -i in.mp4 -vcodec libx264 -crf 24 -acodec mp2 out.mp4
find . -iname "*.mts" | xargs -I {} ffmpeg -i {} -vcodec libx264 -crf 40 -acodec mp2 {}.mp4

Reference

UIAnimation delay not working in animateWithDuration:delay:options:animations:completion:

Try to work around with dispatch_after() or performSelector:withDelay:.

@githubutilities
githubutilities / iOS-private-framework.md
Last active March 2, 2023 06:22
iOS private framework