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
@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 / 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 / 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
#!/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 / group-objects-by-property.md
Created March 28, 2019 05:32 — forked from JamieMason/group-objects-by-property.md
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
@virbo
virbo / reactnative.md
Last active February 22, 2020 04:42
Change Display Name and Package Name in React Native

Delete Folder android and ios

$ rm -rf android
$ rm -rf ios

Change name in app.json and package.json for change package name

app.json

"name": "dutainformasi.siakad",
@virbo
virbo / emulator.md
Last active February 7, 2019 12:34
Running emulator Android from CLI

Running emulator Android from CLI

change to home android

$ cd ${ANDROID_HOME}/emulator

list AVD

$ ./emulator -list-avds
# Add these three lines to CORSify your server for everyone.
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"
@virbo
virbo / configuration.h
Last active January 9, 2025 04:31
Configuration File v3D Printer for Marlin Firmware
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@virbo
virbo / host-react-app-on-apache-server.md
Created May 31, 2018 02:36 — forked from ywwwtseng/host-react-app-on-apache-server.md
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production