如何在開發的過程中加入測試。
- Model
- Repository
- Controller
- Auth
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
# --------------------------------------------------------------- | |
# Aotoki Theme for oh-my-zsh theme by Aotoki ([email protected]) | |
# Home Page : http://frost.tw/ | |
# -------------------------------------------------------------- | |
# LS Color | |
LSCOLORS=xxbxcxxxxxdxBxxxxxCxExBhCh | |
#Color Shortcuts | |
R=$fg[red] |
/** | |
* Helper for opening / animating sidebar | |
*/ | |
$.openSidebar = function() { | |
if(isOpen) { | |
var animateRight = Ti.UI.createAnimation({ | |
left : 0, | |
curve : Ti.UI.ANIMATION_CURVE_EASE_OUT, | |
duration : 200 | |
}); |
/* | |
* Facebookアプリ風のメニューを作る。 | |
* Titanium Studio で新規プロジェクトを作成して、 | |
* その際に Master / Detail Application テンプレートを指定してください。 | |
* その後、このファイルを ui/handheld/ios/ApplicationWindow.js に上書きします。 | |
* メニュー用のTableViewは使用者が作成・追加してください。 | |
*/ | |
function ApplicationWindow() { |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
var tabGroup = Titanium.UI.createTabGroup(); | |
var win = Titanium.UI.createWindow(); | |
win.hideTabBar(); | |
win.navBarHidden = true; | |
var tab = Titanium.UI.createTab({window: win}); | |
var Z_INDEX_TOP = 3; | |
var Z_INDEX_BOTTOM = 0; |