This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in {1..100}; do | |
echo $i | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd-run --user --scope -p AllowedCPUs=1 -p MemoryMax=1G -p CPUQuota=10% yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = []; |
Gist for https://youtu.be/41uUsWQjKRw
def animal="cat"
node {
stage('hello') {
echo animal
animal = "dog"
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get input channel number for BlackHole device | |
ffmpeg -f avfoundation -list_devices true -i "" | |
# Record 2 seconds from i.e. input channel 0 | |
ffmpeg -loglevel debug -f avfoundation -i :0 -t 2 test.mp3 | |
https://github.com/ExistentialAudio/BlackHole |
NewerOlder