- spin up the selenium image (selenium/standalone-chrome) as included with laradock
- in
.env.dusk.localsetAPP_URL=http://nginxto point to the docker nginx image - in
tests\DuskTestCase.phpreplace the line'http://localhost:9515', DesiredCapabilities::chrome()with'http://selenium:4444/wd/hub', DesiredCapabilities::chrome() - run
php artisan dusk - ...
- PROFIT
When you try to remove the docker image with the following command
docker rmi 6795374be8c1
Sometimes you might be facing below error:
Error response from daemon: conflict: unable to delete 6795374be8c1 (cannot be forced) - image has dependent child images
Below is the Docker command line used to find the dependent child images
| import sys,os,zipfile,ftplib, configargparse | |
| from os.path import basename | |
| def ftp_login(user,passwd,host,port=21,timeout=30): | |
| try: | |
| ftp = ftplib.FTP() | |
| ftp.connect(host, port, timeout) | |
| ftp.login(user, passwd) | |
| return ftp | |
| except ftplib.all_errors as e: |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
| (py35) cory@heimdall:hyper-h2/ % py.test --help | |
| usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
| positional arguments: | |
| file_or_dir | |
| general: | |
| -k EXPRESSION only run tests which match the given substring | |
| expression. An expression is a python evaluatable | |
| expression where all names are substring-matched |
| const convertToKebabCase = (string) => { | |
| return string.replace(/\s+/g, '-').toLowerCase(); | |
| } |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
- set M2_HOME if maven is installed (on zshrc)
- Encrypt dropbox
- powersave
- keyring (as in https://wiki.archlinux.org/index.php/GNOME/Keyring#PAM_method)
- stow more stuff like rofi
[TOC]
GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/
After discovering it chowing 2 cores, I decided to go about disabling it.
Directories
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |