Skip to content

Instantly share code, notes, and snippets.

View lin's full-sized avatar

Albert Lin lin

View GitHub Profile
@lin
lin / 1 routes.md
Last active August 29, 2015 14:17
Rails API

1, edit the /etc/hosts file

127.0.0.1       api.localhost

2, routes.rb

namespace :api, path: '', constrains: { subdomain: 'api' } do
@lin
lin / doc.md
Last active August 29, 2015 14:17
Sibi API Documentation

1, users

GET api.sibi.com/v1/users
@lin
lin / curl.md
Last active August 29, 2015 14:17
@lin
lin / markdown.md
Last active August 29, 2015 14:18
cataluv/
├── app/
│   ├── assets/
|   |   ├── images/
|   |   ├── fonts/
|   |   ├── audios/
|   |   └── videos/
│   ├── scenarios
| | ├── auth/
@lin
lin / quotes.md
Last active August 29, 2015 14:18

Question everything generally thought to be obvious.

Low noise for focus, rich details for curiosity.

Don't try to be original, just try to be good.

@lin
lin / pod.md
Last active August 29, 2015 14:18

sudo gem install cocoapods

pod setup

Create podfile file

pod install

@lin
lin / 1 basic.md
Last active July 3, 2017 15:41
iOS

1, add a new project from add new

2, add podfile on the root folder

3, pod install

@lin
lin / ssl.md
Last active March 6, 2017 17:47
SSL

nginx ssl

1, buy a Certificate at one service (e.g. ssl.com)

2, Generate a csr file using openssl or this tool http://tools.ssl.com/

The openssl command is something like:

openssl req -new -newkey rsa:2048 -nodes -out www_example_com.csr -keyout www_example_com.key -subj "/C=us/ST=Pennsylvania/L=Philadelphia/O=SSL Inc./CN=www.example.com"
@lin
lin / 1 basic.md
Last active August 29, 2015 14:20
Learning iOS basic

1, container relationships

Screen has window, window has viewController (root), vC has view, view has subview

2,

// Both UIView and UIViewController is a UIResponder
touchesBegan:withEvent:

3,