Install roseta
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Create following aliase in .zshrc
alias arm="env /usr/bin/arch -arm64 /bin/zsh --login"
better | |
zip -0r A.zip A | |
copy A.zip ... | |
unzip A.zip |
Install roseta
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Create following aliase in .zshrc
alias arm="env /usr/bin/arch -arm64 /bin/zsh --login"
When packing a folder which has some hidden top level folders inside like | |
A+ | |
+.yarn | |
+.rc | |
zip -rqq A.zip A | |
will pack those hidden top level folders while |
#!/bin/bash | |
for i in {1..100}; do | |
echo $i | |
done |
services: | |
federate: | |
image: "docker.elastic.co/elasticsearch/elasticsearch:8.11.1" | |
user: elasticsearch | |
ports: | |
- "5005:5005" | |
- "9200:9200" | |
volumes: | |
# - ./plugin.zip:/tmp/plugin.zip | |
# - /home/flavio/git/siren-platform/core/target/releases/siren-federate-8.11.1-34.0-SNAPSHOT-plugin.zip:/tmp/plugin.zip |
To connect to a service on a remote server that does not have its port exposed to the network. | |
For example, to connect to an elasticsearch back end to an investigate demo, incant the following: | |
ssh -L 9200:localhost:9200 -Nf username@remote.host | |
You can then connect to localhost:9200 and it will be forwarded to localhost:9200 on the remote machine. | |
In general, the argument to -L is of the form: |
curl -H 'Content-Type: application/json' -XPUT http://localhost:9220/.siren/_settings -d' | |
{ | |
"settings": { | |
"index.blocks.write": true | |
} | |
}' | |
curl -H 'Content-Type: application/json' -X POST http://localhost:9220/.siren/_clone/.siren-simon?wait_for_active_shards=all | |
curl -H 'Content-Type: application/json' -XPUT http://localhost:9220/.siren/_settings -d' |
systemd-run --user --scope -p AllowedCPUs=1 -p MemoryMax=1G -p CPUQuota=10% yarn start |
const fs = require("fs"); | |
const inPath = process.argv[2]; | |
const outPath = process.argv[3]; | |
const content = fs.readFileSync(inPath); | |
const json = JSON.parse(content); | |
const hits = json.hits.hits; | |
const res = []; |