Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
brew install tmux
Run tmux -CC
or tmux -CC attach
in iTerm2 and then menu is shown on terminal:
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o
2.1.5 :027 > def flatten a | |
2.1.5 :028?> flat = [] | |
2.1.5 :029?> a.each{|i| i.is_a?(Array) ? flat += flatten(i) : flat << i } | |
2.1.5 :030?> return flat | |
2.1.5 :031?> end | |
=> :flatten | |
2.1.5 :032 > flatten [1,2,[:a,:b,:c],3,4] | |
=> [1, 2, :a, :b, :c, 3, 4] | |
2.1.5 :033 > |
package main | |
import ( | |
redis "gopkg.in/redis.v3" | |
"reflect" | |
"unsafe" | |
"fmt" | |
) | |
type A struct { |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |