Skip to content

Instantly share code, notes, and snippets.

View si294r's full-sized avatar

Chairuddinsyah Siregar si294r

View GitHub Profile

docker

mariadb

docker create --name mariadb -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 mariadb:10.2

docker start mariadb

docker exec -it mariadb /bin/bash

Install mongodb :

Development

file mongo.conf

storage: dbPath: /data/db directoryPerDB: true

#!/bin/sh

echo
echo aws s3 ls s3://alegrium-logs/alegrium2/$(date +%Y%m%d)
aws s3 ls s3://alegrium-logs/alegrium2/$(date +%Y%m%d)

echo
echo aws s3 ls s3://alegrium-logs/api/$(date +%Y%m%d)
aws s3 ls s3://alegrium-logs/api/$(date +%Y%m%d)
# MaxScale documentation on GitHub:
# https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md

# Global parameters
#
# Complete list of configuration options:
# https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Getting-Started/Configuration-Guide.md

[maxscale]

Login ssh without password

ssh-keygen

ssh-copy-id -i ~/.ssh/id_rsa.pub chairuddinsyah@10.0.4.13

ssh chairuddinsyah@10.0.4.13
<VirtualHost *:80>
        ServerName mytower.xyz
        ServerAlias alegrium2.mytower.xyz

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html_mytower_xyz

        #LogLevel info ssl:warn
        #LogLevel trace8
<VirtualHost *:80>
        ServerName almigh.tv
        ServerAlias alegrium2.almigh.tv

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html_almigh_tv

        #LogLevel info ssl:warn
        #LogLevel trace8

Hasil Eksperimen Tune Up Big Table Events_1377 - Redshift :

Setelah ditambahkan sortkey pada kolom event_time, ternyata hasil query tidak ada perubahan dan tidak menjadi lebih cepat

CREATE TABLE events_1377_2
(
   app_version  varchar(255),
   event_type   varchar(255),
 event_time bigint,

autoindex is not working when using php-fpm. The solution is to remove 'index.php' from DirectoryIndex.

logrotate

logrotate -f /etc/logrotate.d/apache2

copy log files to /root/logs with "scp" or "docker cp"

scp /var/log/apache2/*.log.1 root@localhost:/root/logs/20170206/
rm /var/log/apache2/*.log.1