Skip to content

Instantly share code, notes, and snippets.

View virbo's full-sized avatar
💭
I may be slow to respond.

Yusuf Ayuba virbo

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
# Backup database postgres (SIAKAD AKPER Luwuk)
# Author Yusuf Ayuba ([email protected])
# inisial variabel
tgl=$(date +'%H:%M:%S_%d-%m-%Y')
username=<username database>
dbname=<db name>
folderBackup=<folder temporary backup>
fileBackup="backup_"$tgl".sql.gz"
@virbo
virbo / yii-queue.service
Created May 27, 2019 05:07
Yii Queue Service Daemond
# Service worker Yii Queue
# Artikel: https://dutainformasi.net/2019/05/22/implementasi-yii2-queue
# Guide: https://github.com/yiisoft/yii-queue/blob/master/docs/guide/worker.md
# Author Yusuf Ayuba
[Unit]
Description=Yii Queue Worker
After=network.target
# Enable the following two lines only apply if your queue backend is mysql
# replace this with the service that powers your backend
@virbo
virbo / proxy.inc
Last active October 24, 2023 03:14
Nginx Reverse Proxy for PDDIKTI Feeder (Linux version)
# More info here: http://wiki.nginx.org/HttpProxyModule
# Source from Centos Web Panel
proxy_buffering off;
proxy_connect_timeout 59s;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
@virbo
virbo / lib.inc
Last active July 23, 2019 05:06
Script buat check service-service yang non aktif, kirim notif via email dan telegram
#!/bin/bash
#Description: File library berisikan variabel-variabel dan function-function
#Author: Yusuf Ayuba
#user yang bisa menjalankan script ini
USER_ALLOW="root"
#inisial variabel-variabel (Silahkan sesuaikan isian email pengirim dan email tujuan)
FROM="email pengirim"
EMAIL="email tujuan"
@virbo
virbo / installasi.md
Last active February 19, 2020 03:45
All about Django - Python2 - Python3

SETUP VIRTUAL ENV

pip install virtualenvwrapper

SETUP ENV PATH

nano .bash_profile
@virbo
virbo / centos-virtualmin.md
Last active August 2, 2022 19:27
Install Virtualmin di Centos 7
@virbo
virbo / public-private-pem.md
Last active February 1, 2023 16:46
Create public.pem and private.pem for using with JWT

Create Private Key

openssl genrsa -out private_key.pem 2048

Create Public key

openssl rsa -in private_key.pem -pubout -out public_key.pem
@virbo
virbo / backup.sh
Last active May 1, 2023 04:33
Bash Script Backup DB and File Website to Kilat Storage
#!/bin/bash
# Backup Mysql DB, Wordpress (https://dutainformasi)
# Author Yusuf Ayuba ([email protected])
#override endpoint aws amazone s3 with endpoint s3 kilatstorage
alias aws='aws --endpoint-url https://s3-id-jkt-1.kilatstorage.id'
# inisial variabel
tgl=$(date +'%H:%M:%S_%d-%m-%Y')
USER_DB="user_db"
@virbo
virbo / locale.md
Created September 8, 2020 12:11
Fix Error "WARNING! Your environment specifies an invalid locale. on Ubuntu 16.04"

Edit file /etc/default/locale

nano /etc/default/locale

paste this

LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8