Skip to content

Instantly share code, notes, and snippets.

View nulldef's full-sized avatar
:electron:

Aleksei Bespalov nulldef

:electron:
View GitHub Profile
@StanGenchev
StanGenchev / install-erlang-elixir-el8.sh
Last active April 23, 2024 14:01
Install Erlang and Elixir on CentOS 8 or Red Hat Enterprise Linux 8
#!/bin/sh
# This file can be used as an auto installer or you can mannually execute the steps yourself.
# If you use it as an installer, you must run it as root.
# Check if the script is run with sudo
if [ "$EUID" -ne 0 ]
then echo "Please run as root or with sudo"
exit
else
echo "Installing Erlang and Elixir..."

VPN-сервисы

Существует огромное количество VPN-сервисов. Вот два популярных варианта:

  1. https://nordvpn.com/ большие скидки при оплате за 2 и 3 года, возврат денег в течение 30 дней (если зайти на https://nordvpn.com/features/ и пролистать вниз, то появится попап со скидкой 77% — $99 за три года)
  2. https://www.privateinternetaccess.com/ старый, добротный

Таблица сравнения кучи VPN-сервисов https://thatoneprivacysite.net/vpn-comparison-chart/

См. также:

@zmts
zmts / tokens.md
Last active June 16, 2024 18:33
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
#/etc/init/{{item.app}}.conf
description "Unicorn"
start on startup
console output
env NEW_RELIC_APP_NAME={{app_name}}
env UNICORN_WORKERS={{unicorn_workers}}
env app=/u/apps/{{item.app}}/current
#See https://github.com/pluginaweek/state_machine/issues/251
module StateMachine
module Integrations
module ActiveModel
public :around_validation
end
module ActiveRecord
public :around_save
end
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active May 20, 2024 11:27
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');

Zero downtime deploys with unicorn + nginx + runit + rvm + chef

Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).

Other application notes:

  • Our application uses MongoDB, so we don't have database migrations to worry about as with MySQL or postgresql. That does not mean that we won't have to worry about issues with the database with indexes being built in MongoDB or what have you.
  • We use capistrano for deployment.

Salient points for each file:

@incredimike
incredimike / variousCountryListFormats.js
Last active June 16, 2024 16:38
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//