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
# Start pod named "sq-shell". | |
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq | |
# Shell into the pod. | |
$ kubectl exec -it sq-shell -- zsh |
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
# ffmpeg -i "$1" -vcodec h264 -threads 10 "$2" | |
process_mov_files() { | |
{ | |
find . -name "*.mov" -print0 | while read -d $'\0' file | |
do | |
{ | |
NEW_NAME="$(echo "${file%.mov}" | sed 's/[ _]/-/g' | tr '[:upper:]' '[:lower:]')" | |
ffmpeg -i "$file" -vcodec h264 -threads 10 -f mp4 "${NEW_NAME}.mp4" | |
} < /dev/null |
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
while true; do printf 'HTTP/1.1 200 OK\n\n%s' "pong $(date)" | nc -l 8888; 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
* To use Docker, the Docker daemon must be running as root. To automatically | |
* start the Docker daemon at boot, add Docker to the default runlevel: | |
* rc-update add docker default | |
* Similarly for systemd: | |
* systemctl enable docker.service | |
* | |
* To use Docker as a non-root user, add yourself to the 'docker' group: | |
* usermod -aG docker youruser |
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
#!/usr/bin/env bash | |
# INPUT_SRC=input.mp4 | |
INPUT_SRC=input.mp4 | |
START_TIME=00:39:51 | |
END_TIME=00:40:29 | |
echo Start processing | |
ffmpeg -ss $START_TIME -i $INPUT_SRC -acodec copy -vcodec copy -c copy -to $END_TIME output2.mp4 | |
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
INPUT_SRC=$(youtube-dl -f best -g 'https://www.youtube.com/watch?v=wnHW6o8WMas') | |
ffmpeg -ss 00:01:22 -i $INPUT_SRC -vframes 1 -q:v 2 output.jpg |
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
# shared library | |
// mylib/vars/myGitlabStage.groovy | |
call (String _stage, Closure _closure, String _label = 'master') { | |
stage(_stage) { | |
node (_label) { | |
gitlabCommitStatus(name: _stage ) { | |
_closure() | |
} | |
} // node |
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
[main] "stdout_lines": [ | |
[main] "JENKINS_HOME=/opt/jervis/../my_jenkins_home", | |
[main] "GIT_PREVIOUS_SUCCESSFUL_COMMIT=2287deab5c65f0597650ec7f83f779883ae4c5a0", | |
[main] "ENVIRONMENT_NAME=dev", | |
[main] "MAIL=/var/mail/jenkins", | |
[main] "USER=jenkins", | |
[main] "RUN_CHANGES_DISPLAY_URL=http://localhost:8080/page=changes", | |
[main] "HUDSON_URL=http://localhost:8080/", | |
[main] "NODE_LABELS=ansible docker docker-local-dace45f6a860 linux stable", | |
[main] "GIT_COMMIT=c690358ed6678d11fe96684690ab00c103c218c3", |
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
- name: Set serviceName for ingress rules | |
debug: msg="{{ definition.spec.rules[sub_index] }}" | |
with_subelements: | |
- "{{ definition.spec.rules }}" | |
- http.paths | |
loop_control: | |
index_var: sub_index | |
when: type == 'ingress' |
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
# ansible-playbook -i inventory playbook.yml -vv | |
all: | |
vars: | |
ansible_connection: local | |
var1: "value from all" | |
group1: | |
vars: | |
var1: "value from group1" | |
hosts: |
NewerOlder