Skip to content

Instantly share code, notes, and snippets.

View victor-abz's full-sized avatar

Abizeyimana Victor victor-abz

View GitHub Profile
@victor-abz
victor-abz / pg_change_schema_owner.sh
Last active November 15, 2022 14:23 — forked from bspkrs/pg_change_schema_owner.sh
Changes the owner on all tables, sequences, views, and functions in a PostgreSQL database with support for identifiers with whitespace and non-public schemas.
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script sets ownership for all tables, sequences, views, and functions for a given schema.
Run this script as your postgres OS user.
@victor-abz
victor-abz / centos_static_ip.md
Last active May 26, 2023 15:28
Network setup on centos
  1. View network interfaces by nmcli -p dev // to check network port

  2. Edit /etc/sysconfig/network-scripts/ifcfg-networkdevicename

  3. press i for editing and change the following

DEVICE=device_name
BOOTPROTO=none
@victor-abz
victor-abz / backup.sh
Created June 14, 2023 13:48
Used for backing up Frappe/ERPNext sites to github repo
#!/bin/bash
# Used for backing up Frappe/ERPNext sites
# Adjust details and add as cron job on server to automate backups
# Script to backup all sites in Frappe Bench to GitHub
# Switch to bench directory and
# Backup all sites with files to backup folder
# Backup files can be easily restored on a new frappe bench
@victor-abz
victor-abz / windowsSSL.md
Created July 28, 2023 10:52
Create windows SSL
  1. Convert .crt .pem and .key to PFS for Win Server Import using openssl
openssl pkcs12 -export -out output_sile_path.pfx -inkey ssl_key_path.key -in crt_file_path.crt -certfile pem_ssl_file_path.pem
  1. Import in Windows
c:> certutil -importPFX pfx_ssl_path.pfx
@victor-abz
victor-abz / Procfile
Created February 22, 2024 14:17 — forked from revant/Procfile
Use node server with frappe-bench
redis_cache: redis-server config/redis_cache.conf
redis_socketio: redis-server config/redis_socketio.conf
redis_queue: redis-server config/redis_queue.conf
web: bench serve --port 8000
socketio: /usr/bin/node apps/frappe/socketio.js
custom_app: /usr/bin/node apps/custom_app/custom_node.js
watch: bench watch
schedule: bench schedule
worker_short: bench worker --queue short