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
# 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: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
[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
import json
import os
from django.core.wsgi import get_wsgi_application
from webob import Request
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
application = get_wsgi_application()
@ichux
ichux / mkv_mp3.sh
Created January 9, 2024 12:17
extract mp3 from mkv
ffmpeg -i vokoscreenNG-2024-01-09_12-33-41.mkv -vn -acodec copy fidesic.mp3