Skip to content

Instantly share code, notes, and snippets.

View febridev's full-sized avatar
💭
Learning Some Data Engineer

febriyant abidin febridev

💭
Learning Some Data Engineer
View GitHub Profile
@febridev
febridev / DOCKER_COMPOSE.md
Created July 30, 2020 09:48 — forked from GabrielCzar/DOCKER_COMPOSE.md
Docker compose samples

Scripts to run specific services

@febridev
febridev / dim.date.sql
Created June 8, 2020 08:06 — forked from ekayxu/dim.date.sql
date dimension generate procedure
##DELIMITER $$
DROP TABLE IF EXISTS `date_dimension`;
CREATE TABLE `date_dimension` (
`datekey` int(10) unsigned NOT NULL,
`date` date NOT NULL,
`day_of_week` tinyint(4) unsigned NOT NULL COMMENT '一星期中的第几天',
`day_num_in_month` tinyint(4) unsigned NOT NULL COMMENT '一个月中的第几天',
`day_num_overall` mediumint(6) unsigned NOT NULL COMMENT '日计数',
`day_name` varchar(9) NOT NULL COMMENT '星期几',
@febridev
febridev / sql
Created June 8, 2020 07:58 — forked from goncaloalves/sql
Date Dimension Table
-- Credit to https://www.mssqltips.com/sqlservertip/4054/creating-a-date-dimension-or-calendar-table-in-sql-server/
-- created by Aaron Bertrand (@AaronBertrand)
-- modified by goncaloalves
DECLARE @StartDate DATE = '20000101', @NumberOfYears INT = 30;
-- prevent set or regional settings from interfering with
-- interpretation of dates / literals
SET DATEFIRST 7;
https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb
@febridev
febridev / command_run.txt
Last active May 6, 2019 02:42
run with local ip docker mysql
$ docker run -p 3306:3306 --name shopapp-mysql -e MYSQL_ROOT_PASSWORD=myRootpwd32 -d mysql:5.7
---- add for location datafile
-v /my/own/datadir:/var/lib/mysql
---- add config file
-v /my/custom:/etc/mysql/conf.d
@febridev
febridev / install-mongodb-ubuntu1604.md
Created November 23, 2018 12:39 — forked from fernandoaleman/install-mongodb-ubuntu1604.md
Install MongoDB on Ubuntu 16.06

Install MongoDB on Ubuntu 16.04

Import MongoDB GPG Key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Add MongoDB apt repository

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
@febridev
febridev / gist:dd6c5ea08cc9b6335d7d0d43ed2ef559
Created August 28, 2018 09:46 — forked from fduran/gist:4622779
MySQL Master-Slave Replication
# www.fduran.com
MySQL Master-Slave Replication Notes
Master
/etc/mysql/my.cnf
server-id = 100
log_bin = /var/log/mysql/mysql-bin.log
binlog-do-db = wpdb
binlog-ignore-db = mysql
@febridev
febridev / SSLXampp.md
Created July 17, 2018 08:03 — forked from nguyenanhtu/SSLXampp.md
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@febridev
febridev / configuration_step.txt
Last active May 6, 2018 11:43
maria db cluster centos 7
Hello everybody. Today I will show you how to install and config galera-cluster on centos 7
we have 3 CentOS 7 with example network card on brigde and LAN 172.16.2.0/24
Video Refrences But in this video is used Centos 6 probably step is same with some little change.
https://www.youtube.com/watch?v=PuYKc4uxeC0
Topology - example
galera-db01 - 172.16.2.20
galera-db02 - 172.16.2.13
haproxy - 172.16.2.24
@febridev
febridev / httpd-vhosts.conf
Created March 26, 2018 04:56
virtual host xampp windows
<VirtualHost *:80>
ServerAdmin admin@bisakomputer.wp
DocumentRoot "d:\web-dir\bisakomputer.wp"
ServerName bisakomputer.wp
ServerAlias bisakomputer.wp
ErrorLog logs/bisakomputer.wp.log
CustomLog logs/bisakomputer.wp.log combined
<Directory "d:\web-dir\mimi.dev">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All