Send email asynchroniously using Sidekiq.
Create your mailer us usual:
| {0: 'tench, Tinca tinca', | |
| 1: 'goldfish, Carassius auratus', | |
| 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
| 3: 'tiger shark, Galeocerdo cuvieri', | |
| 4: 'hammerhead, hammerhead shark', | |
| 5: 'electric ray, crampfish, numbfish, torpedo', | |
| 6: 'stingray', | |
| 7: 'cock', | |
| 8: 'hen', | |
| 9: 'ostrich, Struthio camelus', |
| OPENWEATHER_APIKEY = "" # TODO add your apikey here | |
| lat = "49.868183" # latitude of the city you want to get the weather from | |
| lon = "8.626288499" # longitude of the city you want to get the weather from | |
| def getWeatherEmoji(weatherID) | |
| # Openweathermap Weather codes and corressponding emojis | |
| thunderstorm = "\u{1F4A8}" # Code: 200's, 900, 901, 902, 905 | |
| drizzle = "\u{1F4A7}" # Code: 300's | |
| rain = "\u{02614}" # Code: 500's |
| AllCops: | |
| RunRailsCops: true | |
| Exclude: | |
| - 'bin/**/*' | |
| - 'db/**/*' | |
| - 'vendor/**/*' | |
| - 'tmp/**/*' | |
| - 'spec/spec_helper.rb' | |
| - 'spec/rails_helper.rb' |
| #!/usr/bin/env ruby -rubygems | |
| # Shamir's Secret Sharing Scheme with m-of-n rule for 128-bit numbers. | |
| # Author: Oleg Andreev <oleganza@gmail.com> | |
| # | |
| # * Deterministic, extensible algorithm: every combination of secret and threshold produces exactly the same shares on each run. More shares can be generated without invalidating the first ones. | |
| # * This algorithm splits and restores 128-bit secrets with up to 16 shares and up to 16 shares threshold. | |
| # * Secret is a binary 16-byte string below ffffffffffffffffffffffffffffff61. | |
| # * Shares are 17-byte binary strings with first byte indicating threshold and share index (these are necessary for recovery). | |
| # | |
| # See also: https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing |
Английская версия: https://evilmartians.com/chronicles/bootstrap-an-intervention
У CSS есть несколько базовых проблем, которые позволяют очень быстро отстрелить себе ногу при неправильном использовании:
Глобальный неймспейс – в серверном программировании все что написано в файле, в файле и остается. Все же что написано в css и js засирает глобальное пространство имен со всеми вытекающими. В JS эту проблему сейчас побороли всякими модульными системами, а вот с css сложнее. В идеальном мире это должен починить Shadow DOM и настоящие Web Components, но пока их нет единственный способ с этим бороться – следовать какой-то системе именований селекторов, которая по возможности уменьшает и исключает возможные конфликты.
Каскадность – если на один элемент может сработать несколько правил, то они все и сработают последовательно. Если есть элемент h1.title, на него сработают все правила для тегов h1 и все правила для класса .title. Так как весь html состоит из тегов, то правил которые п
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent##21 августа
Chrome internals & rendering performance — Алексей Швайка
https://docs.google.com/presentation/d/1jcGSA2WEqh81uMO-3IBSX-LKOjA8jSVwyAsIIA96_ec/edit?pli=1#slide=id.p
https://gist.github.com/shvaikalesh/f68cd2b7ecb815b6c467
WebRTC — real-time communications — Илья Касьяненко
-/-
Сила JavaScript в облаке Azure — Маргарита Остапчук
| require 'anima' | |
| require 'transproc' | |
| require 'virtus' | |
| require 'benchmark/ips' | |
| USERS = 1000.times.map { |i| { id: "#{i+1}", name: "User #{i+1}", age: "#{(i+1)*2}" } } | |
| module Mappings |