Skip to content

Instantly share code, notes, and snippets.

View artkirienko's full-sized avatar
🌇
Working remotely @ Vancouver, Canada

Artem Kirienko artkirienko

🌇
Working remotely @ Vancouver, Canada
  • https://pressreader.com
  • Vancouver, Canada
  • 04:05 (UTC -07:00)
  • LinkedIn in/artkirienko
View GitHub Profile
@artkirienko
artkirienko / nginx.conf
Last active June 7, 2016 16:57 — forked from Darksecond/nginx.conf
Systemd + Unicorn + Nginx + no-downtime-reload
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
# you generally only need one nginx worker unless you're serving
# large amounts of static files which require blocking disk reads
worker_processes 1;
# # drop privileges, root is needed on most systems for binding to port 80

Post Upgrade to El Capitan, with Homebrew & Ruby

... and Xcode and Java, etc.

Prepare

If you don't already have homebrew installed, do that first, so you don't have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan.

Hardware

# Русский перевод для https://github.com/plataformatec/devise/tree/v3.2.4
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n
ru:
devise:
confirmations:
confirmed: "Ваша учётная запись подтверждена."
send_instructions: "В течение нескольких минут Вы получите письмо с инструкциями по подтверждению Вашей учётной записи."
send_paranoid_instructions: "Если Ваш адрес email есть в нашей базе данных, то в течение нескольких минут Вы получите письмо с инструкциями по подтверждению вашей учётной записи."
failure:

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

We had two distros of Oracle DB, seven forks of MySQL from different vendors,
five DVDs with MS SQL Server, a saltshaker half-full flash drive with PostgreSQL debs,
source code for a whole galaxy of FOSS databases... Including Redis, Memcached, MongoDB, Elasticsearch, and Neo4j.
Not that we needed all that for the workshop, but once you get locked into a serious data warehousing,
the tendency is to push it as far as you can. The only thing that really worried me was the SQLite.
There is nothing in the world more helpless and irresponsible and depraved than in-process embedded serverless databases,
and I knew we'd get into that rotten stuff pretty soon.
require 'faraday'
require 'benchmark'
@conn = Faraday.new(url: 'https://www.google.com')
@threads = []
Benchmark.bm(14) do |x|
x.report('no-threads') do
8.times { @conn.get }
end
@artkirienko
artkirienko / subtitle-extract.txt
Created November 28, 2017 10:47 — forked from bmaeser/subtitle-extract.txt
extract subtitles from *.mkv-files on osx
lines with $ are commands
### install mkvtoolnix:
$ brew install mkvtoolnix
### list content of the mkv-file:
$ mkvmerge -i mymoviefile.mkv
### what will give you:

Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process

Taken from StackExchange

Thanks to LangLangC

Improved thermal and power management

Open Terminal.app

@artkirienko
artkirienko / script.sh
Created September 16, 2019 21:12 — forked from cheungnj/script.sh
Convert asciidoc to Github Flavored Markdown
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor