TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.
| locals { | |
| task_definition_family = "${local.prefix}-${var.ecs_task_name}" | |
| } | |
| data "aws_region" "current" {} | |
| data "aws_caller_identity" "current" {} | |
| data "aws_ecs_task_definition" "hack_get_image" { | |
| count = var.preserve_image ? 1 : 0 | |
| task_definition = local.task_definition_family | 
| #!/bin/bash | |
| sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool NO | |
| # Enter some long unpredictable password | |
| sudo passwd root | 
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
| function ssr(req, res, url) { | |
| let user = req.user //comes from passport | |
| const preloadedState = { user, url } // Compile an initial state | |
| const store = configureStore(preloadedState) // Create a new Redux store instance | |
| const html = render(<Provider store={store}><Html /></Provider>) // Render the component to a string | |
| const finalState = store.getState() // Grab the initial state from our Redux store | |
| res.send(renderFullPage(html, finalState)) // Send the rendered page back to the client | |
| } | |
| function renderFullPage(html, preloadedState) { | 
Purpose of my lightning talk is to present insights I've reached as a reviewer/ reviewee in the last couple of months.
I will answer these questions:
| """Ansible dict filters.""" | |
| # Make coding more python3-ish | |
| from __future__ import (absolute_import, division, print_function) | |
| __metaclass__ = type | |
| from ansible.errors import AnsibleError | |
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
| #!sh | |
| dockerfile() { | |
| cat <<EOF | |
| FROM debian:8 | |
| RUN echo 123 >/a && printf abc >/b | |
| RUN echo 456 >/a && echo def >>/b | |
| EOF | |
| } | 
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