const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |