Skip to content

Instantly share code, notes, and snippets.

View Milkywayrules's full-sized avatar
🧐

Dio Ilham Djatiadi Milkywayrules

🧐
View GitHub Profile
@Milkywayrules
Milkywayrules / webpack.common.js
Last active September 17, 2021 08:55
Webpack + Babel + minify js + minify css + fonts + generate favicons + optimized for cache + ready for common, dev, and prod.
// Split into 3 webpack files
// Install all dev dependencies:
// yarn add -D @babel/core @babel/preset-env babel-loader
// yarn add -D css-loader css-minimizer-webpack-plugin
// yarn add -D favicons favicons-webpack-plugin html-webpack-plugin
// yarn add -D mini-css-extract-plugin terser-webpack-plugin
// yarn add -D webpack webpack-cli webpack-dev-server webpack-merge
// If you're using async in your code and have trouble when running,
// probably you need to install this:
<?php
/*
|--------------------------------------------------------------------------
| Excel To Array
|--------------------------------------------------------------------------
| Helper function to convert excel sheet to key value array
| Input: path to excel file, set wether excel first row are headers
| Dependencies: PHPExcel.php include needed
*/
function excelToArray($filePath, $header=true){