Skip to content

Instantly share code, notes, and snippets.

View zhaiyjgithub's full-sized avatar
🎯
Focusing

JerryY zhaiyjgithub

🎯
Focusing
View GitHub Profile
@ifels
ifels / golang_nginx.txt
Last active November 20, 2020 03:59
通过nginx反向代理go语言写的http服务器
通过nginx反向代理go语言写的http服务器
1. nginx 配置
#列出所有服务器地址,nginx 自动均衡分发请求到各个服务器。
upstream frontends {
ip_hash;
server 192.168.199.1:8088;
server 192.168.199.2:8089;
}
server {
listen 80;
@gonzalezreal
gonzalezreal / ios-cell-registration-swift.md
Last active March 13, 2024 15:18
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

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)