Stylus - это препроцессор CSS, который был написан на JavaScript для Node.js.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
Стопнуть кучу контейнеров по фильтру
docker ps -f 'name=shop*' --format "{{.ID}}" | xargs -L 1 docker stop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Active line color | |
"workbench.colorCustomizations": { | |
"editor.lineHighlightBackground": "#39dc4f39", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"text":"Австралия", | |
"value":"AU" | |
}, | |
{ | |
"text":"Австрия", | |
"value":"AT" | |
}, | |
{ |
Using not default ssh key
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_another" git clone ...
# in project root
git config --local core.sshCommand 'ssh -i ~/.ssh/id_rsa_another'
Reset merge commit
git reset --merge HEAD~1
Рекурсивное получение массива значений в хэше/дереве
import flatMapDeep from 'lodash/flatMapDeep'
function getResponseErrors(errors) {
function deep(n) {
if (typeof(n) === 'object') return flatMapDeep(n, deep);
return n;
}
Проверка того, что один массив хэшей содержится в другом (при этом порядок объявления ключей не важен, в отличии от использования .to eq
)
RSpec.describe [{ a: 1 , b: 2 }, { a: 2 , b: 1 }, { c: 11 , d: 22 }] do
let (:val) { [{ b: 1 , a: 2 }, { c: 11 , d: 22 }] }
it { is_expected.to include(*val) }
end
Вызов метода у subject для теста (its
выпилили из rspec 3, https://gist.github.com/myronmarston/4503509, тут можно поставить гем https://github.com/dnagir/its)