Skip to content

Instantly share code, notes, and snippets.

View mhz-tamb's full-sized avatar

Sergey Shiryaev mhz-tamb

View GitHub Profile
@glutaminefree
glutaminefree / init.coffee
Last active July 23, 2020 07:04
Atom sync-settings
atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerCommand 'tabl', -> atom.workspace.getActivePane().moveItemLeft()
Ex.registerCommand 'tabr', -> atom.workspace.getActivePane().moveItemRight()
Ex.registerCommand 'e', -> atom.workspace.getActiveTextEditor().getBuffer().reload()
treeView = document.querySelector('.tool-panel.tree-view')
@zmts
zmts / tokens.md
Last active September 25, 2024 16:04
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 7, 2024 14:29
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

{
"name": "upstatement/cooltheme",
"description": "Starter theme to build a Timber theme",
"type":"wordpress-theme",
"minimum-stability" : "dev",
"authors": [
{
"name": "andyrader",
"email": "andy.rader@upstatement.com"
@Vestride
Vestride / encoding-video.md
Last active August 27, 2024 16:19
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',