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
  • 21:52 (UTC -07:00)
  • LinkedIn in/artkirienko
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<Z>
<BuhData>
<BankAccSum>6437131.31</BankAccSum>
<Ost51>
<Position1>
<Name>4.44.РКО банка</Name>
<d>0.00</d>
<k>678.00</k>
</Position1>
@artkirienko
artkirienko / gist:5735985
Last active December 18, 2015 05:49
Checked square unicode sign
×
# Русский перевод для 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:
<!DOCTYPE html>
<html>
<head><base href="http://socialjack.github.io/">
<script> (window.YaCC || (window.YaCC = {})).date = '07.05.2016 [23:46:37]'; window.YaCC.mysign = '1462656590.75cbd8353e8a909f3c58b5e4d78b61ef'; </script>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&subset=latin,cyrillic" rel="stylesheet" type="text/css">
<style type="text/css">
#popup,html{height:100%}#form button,.step-2{bottom:10px;right:10px}#form button,#post,#wrapper{position:absolute}body,html{padding:0;margin:0}body{min-height:100%;font-family:'Open Sans';font-size:14px}body>div{display:none}#popup{position:fixed;top:0;left:0;width:100%;display:flex;align-items:center;justify-content:center;color:#333;background:#BBBBBB;transition:opacity .3s ease-out}#popup.hidden{opacity:0;pointer-events:none}#form{background:#fff;border:1px solid #aaa;border-radius:5px;width:320px;height:120px;position:relative;padding:10px;box-sizing:border-box;box-shadow:0 0 30px rgba(0,0,0,.3)}#form button{backgro
content = (7_000_000_00_00..7_999_999_99_99).map{|phone| "<option value=\"#{phone}\">#{phone}</option>"}.join('')
File.open('hello.txt', 'w') { |file| file.write(content) }
@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
@artkirienko
artkirienko / sublime_install.txt
Last active July 9, 2016 00:49
Sublime Text 3 Install
Plugins:
ctrl+`
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
ctrl shit p
lenovo:
better coffeescript

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