Make group permissions same like user's
chmod g=u <file>Export whole env file
export $(cat .env | xargs)
Make group permissions same like user's
chmod g=u <file>Export whole env file
export $(cat .env | xargs)
| ==> https://blog.sitedd.ru/archives/109 | |
| Linux. Монтирование Яндекс.Диск по WebDAV в локальную файловую систему | |
| Ubuntu 16.04 | |
| davfs2 | |
| Установка davfs2 |
If you're looking to swap the Ctrl + Cmd keys in Ubuntu 16.04 either just because, or because you're using VirtualBox with an Ubuntu guest and an OSX host, then the answer you're looking for is here. Courtesy of Joel Koh.
nano /usr/share/X11/xkb/symbols/pc
If you're converting some symbol with a method that assumes the string, than you have additional to_s -> method -> to_sym convertation
time ruby -e '100_000_000.times { "A".downcase }' # 6.70s user 0.06s system 93% cpu 7.254 total
time ruby -e '100_000_000.times { :A.downcase }' # 8.39s user 0.04s system 99% cpu 8.497 total| Active line color | |
| "workbench.colorCustomizations": { | |
| "editor.lineHighlightBackground": "#39dc4f39", | |
| } |
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Стопнуть кучу контейнеров по фильтру
docker ps -f 'name=shop*' --format "{{.ID}}" | xargs -L 1 docker stopПроверка того, что один массив хэшей содержится в другом (при этом порядок объявления ключей не важен, в отличии от использования .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)
Рекурсивное получение массива значений в хэше/дереве
import flatMapDeep from 'lodash/flatMapDeep'
function getResponseErrors(errors) {
function deep(n) {
if (typeof(n) === 'object') return flatMapDeep(n, deep);
return n;
}