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;
@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 / countries.sql
Created January 24, 2018 02:49 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@febridev
febridev / README-Template.md
Created October 27, 2016 04:00 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@febridev
febridev / README.md
Created October 27, 2016 04:00 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@febridev
febridev / PostController.php
Created October 14, 2016 02:28 — forked from franquis/PostController.php
Summernote image upload with PHP (Laravel + Intervention\lmage)
<?php
/**
* This exemple shows how to parse base64 encoded images (submitted using Summernote), save them locally
* and replace the 'src' attribute in the submited HTML content
*
**/
use Intervention\Image\ImageManagerStatic as Image;
class PostController {
public function edit(){