- Mac OS X 背后的故事(一)力挽狂澜的Ellen Hancock
- Mac OS X 背后的故事(二)Linus Torvalds的短视
- Mac OS X 背后的故事(三)Mach之父Avie Tevanian
- Mac OS X 背后的故事(四)政客的跨界
- Mac OS X 背後的故事(五)Jean-Marie Hullot 的天才天才發明 Interface Builder
- Mac OS X 背后的故事(六)上善若水 Cordell Ratzlaff 引发的 Aqua 革命(上)
- Mac OS X 背後的故事(七)上善若水 Cordell Ratzlaff 引發的 Aqua 革命(下)
- Mac OS X 背後的故事(八)三好學生 Chris Lattner 的 LLVM 編譯工具鏈
- Mac OS X 背後的故事(九)半導體的豐收(上)
- [Mac OS X 背後的故事(十)半導體的豐收(中)](https
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
A common task when developing iOS apps is to register custom cell subclasses for both UITableView
and UICollectionView
. Well, that is if you don’t use Storyboards, of course.
Both UITableView
and UICollectionView
offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
// | |
// Created by Dima Vartanian on 10/29/15. | |
// | |
import Foundation | |
import Crashlytics | |
// this method gives us pretty much the same functionality as the CLS_LOG macro, but written as a Swift function, the only differences are that we have to use array syntax for the argument list and that we don't get see if the method being called is a class method or an instance method. We also have to define the DEBUG compiler flag with -D DEBUG. | |
/// Usage: | |
/// |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
I like Pages.app, but don't want to deal with constantly copying and pasting code around.
Here is how I do syntax highlighting in Pages.app by pressing a key command. It's based off of this post on stack exchange.
sudo easy_install Pygments
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |