Skip to content

Instantly share code, notes, and snippets.

@rustamtolipov
rustamtolipov / digital_ocean_setup.md
Created October 26, 2015 11:56 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@rustamtolipov
rustamtolipov / tasix_parser.rb
Created February 8, 2017 06:02
Tasix networks parser
require 'net/http'
require 'uri'
def parseme(text)
text.each_line do |l|
l.gsub!(/[^\d.\/\s]/, '')
if l.match(/\d+\.\d+\.\d+\.\d+/)
if !l.match(/^[[:blank:]]{3,}/)
l.strip!
l = l.split[0]
@rustamtolipov
rustamtolipov / build_ffmpeg.sh
Created February 15, 2017 06:38
build ffmpeg on debian 8 (not tested)
apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
wget https://ffmpeg.org/releases/ffmpeg-3.1.7.tar.gz
mkdir -p /opt/ffmpeg/bin
mv /tmp/ffmpeg-3.1.7.tar.gz /root/
ls
tar xzf ffmpeg-3.1.7.tar.gz
cd ffmpeg-3.1.7/
ls
apt-get install yasm libx264-dev libmp3lame-dev libopus-dev libvpx-dev
@rustamtolipov
rustamtolipov / nginx.conf
Created August 10, 2017 11:45 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rustamtolipov
rustamtolipov / phx-1.4-upgrade.md
Created November 8, 2018 12:58 — forked from chrismccord/phx-1.4-upgrade.md
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run: