Skip to content

Instantly share code, notes, and snippets.

View ichux's full-sized avatar
🏠
Working from home

Chukwudi Nwachukwu ichux

🏠
Working from home
View GitHub Profile
# https://fontawesome.com/v4/icons/
docker pull minlag/mermaid-cli
# Output file must end with ".md"/".markdown", ".svg", ".png" or ".pdf"
docker run --rm -u `id -u`:`id -g` -v ./onpie:/data minlag/mermaid-cli -i input.mmd
docker run --rm -u `id -u`:`id -g` -v ./onpie:/data minlag/mermaid-cli mmdc -i input.mmd -o output.png
flowchart TD
A[OneR8] -->|Call APIs| B(Analysis)
def strtobool(val):
"""Convert a string representation of truth to true (1) or false (0).
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
'val' is anything else.
"""
val = val.lower()
if val in ('y', 'yes', 't', 'true', 'on', '1'):
return 1
# split large file into 200MB
split -b 200m artofpostgresql.zip
# bring all together
cat * > onefile.zip
scp hphs:~/deployed/corebank/containers/nginx/web-app/assets/env.js .
env.js 100% 1300 277.1KB/s 00:00
scp env.js hphs:~/deployed/corebank/containers/nginx/web-app/assets/env.js
env.js
@ichux
ichux / gist:236abb2b32836badc933c5174cb896d5
Created April 13, 2024 10:59
How to Run HAProxy With Docker (In-Depth Guide)
https://www.haproxy.com/blog/how-to-run-haproxy-with-docker
echo Y | docker system prune -a --volumes
@ichux
ichux / supervisor_uid.sh
Created March 19, 2024 09:14
uid for supervisor
#!/bin/bash
if ! command -v openssl &> /dev/null; then
echo "'openssl' could not be found. Please install it"
exit 0
else
if [ ! $1 ]; then
echo "Usage: 'source filename.sh password'"
else
# http://supervisord.org/configuration.html#unix_http_server
@ichux
ichux / exact.sh
Created March 15, 2024 19:57
exact location
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $DIR/stirs.sh
[program:myapp]
numprocs=5
numprocs_start=01
command=/usr/bin/python3 ./app_server.py 89%(process_num)02d
process_name=%(program_name)s_%(process_num)02d
priority=999
autostart=true
autorestart=unexpected
startsecs=5
startretries=3
[program:fs]
environment=DISPLAY=:0
directory=/home/ichux/devcode/passon
numprocs=1
user=ichux
stopwaitsecs=50
command=bash -c "sleep 5 && python3 fullscreen.py"
redirect_stderr=false