To customise your terminal or iTerm to identify if you are in a Rosetta or Arm64 Architecture terminal, | |
add the following code in your ~/.zshrc file before the Powerlevel 10k statements. | |
# MacOS Architecture detection | |
function prompt_architecture() { | |
arch_name="$(uname -m)" | |
if [ "${arch_name}" = "x86_64" ]; then | |
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then | |
p10k segment -b 7 -f 0 -t 'x86' | |
else |
Especially when developing new query logic, it's helpful to query elasticsearch from the command line.
If your Elasticsearch cluster uses SAML authentication or some other SSO, it's not simple or sometimes not even
possible to query using curl
directly. I wrote an auth plugin for HTTPie that should greatly simplify this process
if you have rights to create API keys via the Kibana dev console (talk to your administrator and see the link below).
This process is also super handy for shell scripting because you can provide fine-grained limits of what your API key can do, making their use much safer and easier to manage than embedding native realm username/passwords.
source_index=source_index | |
target_index=target_index | |
elastic_search_server=elasticsearch:9200 | |
# Make sure the source index is actually open | |
curl -X POST "${elastic_search_server}/${source_index}/_open" | |
# Put the source index in read-only mode | |
curl -X PUT "${elastic_search_server}/${source_index}/_settings" \ |
youtube.com##.ytp-ce-covering-overlay | |
youtube.com##.ytp-ce-element-shadow | |
youtube.com##.ytp-ce-covering-image | |
youtube.com##.ytp-ce-expanding-image | |
youtube.com##.ytp-ce-element.ytp-ce-video.ytp-ce-element-show |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|