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 / pdo-pgsql.sh
Last active February 28, 2018 13:54
Enable pdo_pgsql php7.1.13 on Centos Web Panel
#!/bin/bash
# Enable pdo_pgsql on Centos Web Panel with PHP 7.1.13
# Author Yusuf Ayuba
# inisial variabel
tgl=$(date +'%H:%M:%S_%d-%m-%Y')
pathIni=/usr/local/php
fileBackup=$tgl"_php.ini"
if [ -e "/usr/local/lib/php/extensions/no-debug-non-zts-20160303/pdo_pgsql.so" ]; then
@virbo
virbo / remote_postgres.sh
Last active April 14, 2018 01:03
Step by step configuration postgres form remote open (Server Centos 7)
Path to pgsql config: /var/lib/pgsql/data
PART 1 (edit postgresql.conf)
1. Edit postgresql.conf where
#listen_addresses = 'localhost'
change to
listen_addresses = '*'
2. Edit postgresql.conf where
@virbo
virbo / install-composer.sh
Last active October 1, 2019 12:58
Install Composer on CWP (Centos 7)
#!/bin/bash
# Install Composer on Centos, Ubuntu, Debian
# Author Yusuf Ayuba
user_allow="root"
if [ "$(whoami)" != $user_allow ]; then
echo "==================================================================="
echo " Installasi gagal. Install composer harus menggunakan user: "$user_allow" ="
echo "==================================================================="
@virbo
virbo / http2.md
Last active April 19, 2018 15:27
Enable http2 on CWP

source: https://www.mysterydata.com/how-to-enable-http-2-on-cwp7-centos-web-panel/

HTTP/2 will make our applications faster, simpler, and more robust — a rare combination — by allowing us to undo many of the HTTP/1.1 workarounds previously done within our applications and address these concerns within the transport layer itself. Even better, it also opens up a number of entirely new opportunities to optimize our applications and improve performance!

[link]How to Enable IPv6 on CWP Centos WebPanel[/link]

[link]Apache HTTP to HTTPS htaccess redirect on CWP – Centos WebPanel[/link]

The primary goals for HTTP/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push. To implement these requirements, there is a large supporting cast of other protocol enhancements, such as new flow control, error handling, and upgrade mechanisms, but these are the most importan

@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

@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
# 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 / 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
@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 / 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;