Skip to content

Instantly share code, notes, and snippets.

View tpai's full-sized avatar
🌴
On vacation in Spain

Tony Pai tpai

🌴
On vacation in Spain
View GitHub Profile
@tpai
tpai / apidoc.md
Last active March 30, 2016 05:23
ApidocJS snippet (http://apidocjs.com/)

CLI

apidoc -f ".*\\.js$" -i apisrc/ -o apidoc/

apidoc.json

{
@tpai
tpai / zh_tw.js
Last active February 3, 2016 03:21
tinymce localization (demo: http://jsbin.com/vuhevos/1/edit?html,js,output)
tinymce.addI18n('zh_TW',{
"Cut": "\u526a\u4e0b",
"Heading 5": "\u6a19\u984c 5",
"Header 2": "\u6a19\u984c 2",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u60a8\u7684\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u5b58\u53d6\u526a\u8cbc\u7c3f\uff0c\u53ef\u4ee5\u4f7f\u7528\u5feb\u901f\u9375 Ctrl + X\/C\/V \u4ee3\u66ff\u526a\u4e0b\u3001\u8907\u88fd\u8207\u8cbc\u4e0a\u3002",
"Heading 4": "\u6a19\u984c 4",
"Div": "Div",
"Heading 2": "\u6a19\u984c 2",
"Paste": "\u8cbc\u4e0a",
"Close": "\u95dc\u9589",

有效利用git brach特性的開發模型!

主要分成下列branch:

  • master (主要)
  • develop (開發)
  • feature (功能)
  • release (釋出)
@tpai
tpai / tgdf15-share.md
Last active March 30, 2016 02:49
Android apk security note

Decompile -> Analytic -> Pack -> Sign

Tools

  • apktool
  • dex2jar
  • jd-gui
  • ilspy
  • ildasm
  • SignAPK
@tpai
tpai / travis-coveralls.md
Last active February 20, 2019 07:20
Build Project with Travis-CI and Coveralls

Directory Structure

.
|-- dist/
|-- src/
|-- test/
|  `-- setup.jsx    # jsdom for renderIntoDocument()
|-- .babelrc
|-- .coveralls.yml
@tpai
tpai / extend.md
Last active April 12, 2016 09:10
Design Pattern Learning Note

Classical / Modern Extend Pattern

Classical 在此並不是指傳統或者是經典,而是書中作者用來代表與 Class 相關的意思。而 Modern 則沒其他用意,就是指現在常用的意思。

Recommend Book: Learning Javascript Design Patterns

推薦書籍:Javascript 設計模式

The prototype pattern focuses on creating an object that can be used as a blueprint for other objects through prototypal inheritance. This pattern is inherently easy to work with in JavaScript because of the native support for prototypal inheritance in JS.

@tpai
tpai / Vagrantfile
Last active April 17, 2018 09:57
Docker and Vagrant
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/xenial64'
config.vm.network 'forwarded_port', guest: 3000, host: 3000
config.vm.network 'private_network', ip: '10.10.10.10'
config.vm.provider 'virtualbox' do |vb|
vb.name = 'repo_name'
vb.auto_nat_dns_proxy = false
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off" ]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off" ]
vb.memory = '4096'
@tpai
tpai / nextvod.md
Last active May 3, 2016 15:44
improve no use nextvod box

Improve NextVOD

I don't know how to deal with NextVOD box since NextTV abandoned this service, and there's a group of people make this box live again but with difference uses.

Basic

  1. sh4twbox