Skip to content

Instantly share code, notes, and snippets.

Ildar Manzhikov manzhikov

Block or report user

Report or block manzhikov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@manzhikov
manzhikov / bitbucket-pipelines.yml
Created Mar 2, 2019 — forked from tstrohmeier/bitbucket-pipelines.yml
AWS ECS: Script for creating a new revision of a task definition and update a service
View bitbucket-pipelines.yml
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
# python image with aws-cli installed
@manzhikov
manzhikov / shapefileConversion.md
Created Nov 29, 2017 — forked from YKCzoli/shapefileConversion.md
Step through of converting shapefile to geojson with qgis.
View shapefileConversion.md

Converting shapefiles to geojson

####Assumptions

Get the data

We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:

@manzhikov
manzhikov / snail.rb
Created Aug 19, 2017 — forked from dliberalesso/snail.rb
Sort an array of arrays like a snail (clockwise spiral sorting) with Ruby.
View snail.rb
def snail(array)
result = Array.new
n = array.length
runs = n.downto(0).each_cons(2).to_a.flatten
delta = [[1,0], [0,1], [-1,0], [0,-1]].cycle
x, y = -1, 0
for run in runs
dx,dy = delta.next
run.times do |i|
x += dx
@manzhikov
manzhikov / nginx-tls.conf
Created Jul 26, 2017 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
View nginx-tls.conf
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables SPDY, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#
@manzhikov
manzhikov / encoding-video.md
Created Jun 6, 2017 — forked from Vestride/encoding-video.md
Encoding video for the web
View encoding-video.md

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-aacc --with-opus
View 2.3.3
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
for p in rvm-patchsets/patches/ruby/2.3.3/railsexpress/* ; do
patch -p1 < $p
done
}
install_package "openssl-1.0.2d" "https://www.openssl.org/source/openssl-1.1.0e.tar.gz#57be8618979d80c910728cfc99369bf97b2a1abd8f366ab6ebdee8975ad3874c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.3.3" "http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.gz#241408c8c555b258846368830a06146e4849a1d58dcaf6b14a3b6a73058115b7" patch_ruby_railsexpress ldflags_dirs standard verify_openssl
@manzhikov
manzhikov / install-comodo-ssl-cert-for-nginx.rst
Created Jun 30, 2016 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@manzhikov
manzhikov / digital_ocean_setup.md
Created Apr 30, 2016 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
View digital_ocean_setup.md

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

Create a Droplet

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@manzhikov
manzhikov / 2.2.3
Last active Jan 21, 2016
Rbenv ruby-2.2.3-railsexpress
View 2.2.3
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
for p in rvm-patchsets/patches/ruby/2.2.3/railsexpress/* ; do
patch -p1 < $p
done
}
install_package "openssl-1.0.2d" "https://www.openssl.org/source/openssl-1.0.2d.tar.gz#671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.2.3" "https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz#df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce" patch_ruby_railsexpress ldflags_dirs standard verify_openssl
View application_controller.rb
# As used with CanCan and Devise
class ApplicationController < ActionController::Base
protect_from_forgery
include ErrorResponseActions
rescue_from CanCan::AccessDenied, :with => :authorization_error
rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found
before_filter :authenticate!
You can’t perform that action at this time.