Skip to content

Instantly share code, notes, and snippets.

View Voronenko's full-sized avatar
turning coffee into code since late 90s

Vyacheslav Voronenko

turning coffee into code since late 90s
View GitHub Profile
"ansible_distribution": "Parrot GNU/Linux",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "NA",
"ansible_distribution_major_version": "3",
"ansible_distribution_release": "stable",
"ansible_distribution_version": "3.11",
@Voronenko
Voronenko / nginx.conf
Created March 9, 2018 13:08
nginx proxy private s3 bucket
worker_processes 1;
daemon off;
error_log /dev/stdout info;
pid /usr/local/var/nginx/nginx.pid;
events {
worker_connections 1024;
}
@Voronenko
Voronenko / cbbconfig.txt
Created March 10, 2018 16:45
cbbconfig.txt 024010020120215193500
024010020180215193500
02=960x720
40=40 per second
10=10min
0=PAL
2018=yyyy
02=mm
15=dd
19=hh
35=mm
#!/bin/sh
#
# Copy this script to .git/hooks/pre-commit
#
python update-authors.py > AUTHORS
git add AUTHORS
@Voronenko
Voronenko / a_kubernetes.txt
Last active April 4, 2018 13:14
Kubernetes notes
Notes about kubernetes/minikube
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
unzip protoc-3.5.1-linux-x86_64.zip -d protoc3
sudo mv protoc3/bin/* /usr/local/bin/
sudo mv protoc3/include/* /usr/local/include/
ln -s /protoc3/bin/protoc /usr/bin/protoc
@Voronenko
Voronenko / docker_entry_point_header.sh
Created June 29, 2018 11:15
Temporary fallback host.docker.internal in custom containers #docker
HOST_DOMAIN="host.docker.internal"
ping -q -c1 $HOST_DOMAIN > /dev/null 2>&1
if [ $? -ne 0 ]; then
HOST_IP=$(ip route | awk 'NR==1 {print $3}')
echo -e "$HOST_IP\t$HOST_DOMAIN" >> /etc/hosts
fi
@Voronenko
Voronenko / git_merge_upstream_into_fork.txt
Created July 13, 2018 09:06
Merging upstream in forked repo
git remote add upstream https://github.com/OWNER/REPO.git
git fetch upstream
git checkout master
git merge upstream/master
@Voronenko
Voronenko / nginx_test_script.sh
Created July 21, 2018 17:35
Validates test config
#!/bin/bash
#
# validate nginx config
#
# based on script by Paul Downey
# https://gist.github.com/psd/5042334
test_conf=`mktemp`
target_conf=$1
@Voronenko
Voronenko / slack_curl_test.sh
Created July 24, 2018 10:06
Simple slack integration test using curl
#!/bin/bash
function post_to_slack () {
# format message as a code block ```${msg}```
SLACK_MESSAGE="\`\`\`$1\`\`\`"
SLACK_URL=https://hooks.slack.com/services/your-service-identifier-part-here
case "$2" in
INFO)
SLACK_ICON=':slack:'