Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
#!/usr/bin/env ruby | |
require 'faraday' | |
require 'json' | |
require 'gitlab' | |
module Redmine | |
Host = nil | |
APIKey = nil |
# Adapted from Vadims Podāns' amazing work here. | |
# https://www.sysadmins.lv/blog-en/how-to-convert-pkcs12pfx-to-pem-format.aspx | |
# | |
# Also, if you need a more complete PKI PowerShell module, he has authored one here: | |
# https://github.com/Crypt32/PSPKI | |
# | |
# This version of the function includes a few fixes from the module's version of the | |
# function and changes up the output options so you get separate .crt/.key files by | |
# default named the same as the pfx file (or thumbprint if directly referencing a cert). | |
# -IncludeChain adds an additional -chain.pem. Relative paths are now |
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
function Get-SshFingerprint { | |
param( [string]$ssh_server ) | |
# Load WinSCP .NET assembly | |
Add-Type -Path "${env:ProgramFiles(x86)}\WinSCP\WinSCPnet.dll" | |
# Setup session options | |
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{ | |
Protocol = [WinSCP.Protocol]::Sftp | |
HostName = $ssh_server |
Firstly, Create React App is good. But it's a very rigid CLI, primarily designed for projects that require very little to no configuration. This makes it great for beginners and simple projects but unfortunately, this means that it's pretty non-extensible. Despite the involvement from big names and a ton of great devs, it has left me wanting a much better developer experience with a lot more polish when it comes to hot reloading, babel configuration, webpack configuration, etc. It's definitely simple and good, but not amazing.
Now, compare that experience to Next.js which for starters has a much larger team behind it provided by a world-class company (Vercel) who are all financially dedicated to making it the best DX you could imagine to build any React application. Next.js is the 💣-diggity. It has amazing docs, great support, can grow with your requirements into SSR or static site generation, etc.
Let's say you have a SysV Init Script
named foo
Copy the file to /etc/init.d/foo
Enable the SysV service: chkconfig --add foo
Enable the SysV service: chkconfig foo on
Start the service: service foo start
. After this, systemd-sysv-generator will generate this file /run/systemd/generator.late/foo.service
, copy this file to /etc/systemd/system
by running: cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service
Edit /etc/systemd/system/foo.service
by running systemctl edit foo.service
, add in the following line to foo.servie
(this makes the service installable)
[Install]