A list of questions to ask potential employers.
- Does one single person own a unit of work (task, project, product, etc)?
- Can that single person's manager override the decisions made by that person on that unit of work?
defmodule MyApp.Req do | |
@moduledoc """ | |
Wrapper around Req to apply defaults. See [Req](https://hexdocs.pm/req) | |
This will also protect from external requests running while MIX_ENV=test. | |
To set the adapter in controller or integration tests, you may configure | |
your mock with `Process.put(:req_adapter, my_mock)`. | |
You must specify `external_service` and `request_name` telemetry tags |
# keep the src around for mermaid for re-renders. | |
def maybe_rewrite_mermaid( | |
{"pre", _attrs, [{"code", [{"class", "mermaid"}], inner, meta}], pre_meta} | |
) do | |
{"div", | |
[ | |
{"phx-update", "ignore"} | |
], | |
[ |
function! g:MixRun(selection) abort | |
if !empty(a:selection) | |
execute "!mix ".a:selection | |
endif | |
endfunction | |
function! g:MixFzf(selection = '') abort | |
if empty(a:selection) | |
call fzf#run(fzf#wrap({ | |
\ 'source': 'mix help --names', |
export FROM="petal" | |
export FROM_MOD="Petal" | |
export TO="elixir_stream" | |
export TO_MOD="ElixirStream" | |
cp -R "$FROM" "$TO" | |
cd "$TO" | |
git ls-files -z | xargs -0 perl -p -i -e "s/$FROM/$TO/g; s/$FROM_MOD/$TO_MOD/g;" | |
mv "lib/${FROM}" "lib/$TO" | |
mv "lib/${FROM}.ex" "lib/${TO}.ex" |
# Put this at the bottom | |
## Remap Scarlett input 1 separately | |
load-module module-remap-source source_name=scarlett-xlr-1 source_properties="device.description='Focusrite Scarlett 6i6 XLR 1'" master=alsa_input.usb-Focusrite_Scarlett_6i6_USB_00074100-00.multichannel-input remix=no channels=2 master_channel_map=front-left,front-left channel_map=left,right | |
### Remap Scarlett input 2 separately | |
load-module module-remap-source source_name=scarlett-xlr-2 source_properties="device.description='Focusrite Scarlett 6i6 XLR 2'" master=alsa_input.usb-Focusrite_Scarlett_6i6_USB_00074100-00.multichannel-input remix=no channels=2 master_channel_map=front-right,front-right channel_map=left,right | |
### Remap Scarlett inputs 3&4 separately | |
load-module module-remap-source source_name=scarlett-inputs-3-4 source_properties="device.description='Focusrite Scarlett 6i6 3/4'" master=alsa_input.usb-Focusrite_Scarlett_6i6_USB_00074100-00.multichannel-input remix=no channels=2 master_channel_map=front-center,lfe channel_map=left,right |
#!/bin/bash | |
# Mass expire Redis keys using the SCAN command so it doesn't block or overwhelm | |
# memory | |
# Usage example: ./mass-expire-redis.sh "127.0.0.1" "6379" "mykey:*" "300" | |
# Logs to ./filename.ext.log | |
if [ $# -ne 4 ]; then | |
echo "Usage: $0 <host> <port> <pattern> <expiration>" | |
exit 1 |
# Install prerequisites. I'm using arch, but you can do similar things with brew but paths change. | |
yay gcc6 | |
pacman -S openssl-1.0 | |
OPENSSL_DIR="/usr/lib/openssl-1.0" | |
# If you're on mac and installed with brew, you can do this: | |
# OPENSSL_DIR=$(brew --prefix openssl-1.0) | |
# A patch to let older Ruby to work with newer OpenSSL | |
SSL_PATCH="https://gist.github.com/mislav/055441129184a1512bb5/raw" |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream myapp { | |
server localhost:4000; | |
} | |
server { |