Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
#!/usr/bin/env expect -f | |
# Start the CISCO VPN client on a Mac. Adapted from | |
# https://blog.felipe-alfaro.com/2014/05/23/automating-cisco-anyconnect-secure-mobility-client-on-mac-os-x/ | |
set HOSTNAME vpn.server.com | |
set USER_NAME user.name | |
set PASSWORD password | |
spawn /opt/cisco/anyconnect/bin/vpn |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
# Simple JOIN | |
User.joins(:account) # User -> Account | |
# Will produce | |
# SELECT `users`.* FROM `users` INNER JOIN `accounts` ON `accounts`.`user_id` = `users`.`id` | |
# Complicated JOIN | |
Trait.joins(:user => :account) # Trait -> User -> Account | |
# Will produce | |
# SELECT `traits`.* FROM `traits` INNER JOIN `users` ON `users`.`id` = `traits`.`user_id` INNER JOIN `accounts` ON `accounts`.`user_id` = `users`.`id` |
{ | |
"use_simple_full_screen": false, | |
// calculates indentation automatically when pressing enter | |
"auto_indent": true, | |
// sets the colors used within the text area (default) | |
// see https://github.com/olivierlacan/monokaim to download | |
// the customized Monokai I use. | |
"color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme", |