RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1. Install homebrew from here: http://brew.sh | |
Step 1.1. Run export PATH=/usr/local/bin:$PATH | |
Step 2. Run brew update | |
Step 3. Run brew install vim && brew install macvim | |
Step 4. Run brew link macvim | |
# http://stackoverflow.com/questions/21012203/gvim-or-macvim-in-mac-os-x/21012284#21012284 | |
Adv: | |
- copy & paste between tabs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cal() { | |
// Get total square feet to cover | |
var sf = document.getElementById('sf').value; | |
console.log(sf) | |
// Get tile size | |
var tileSize = document.getElementById('tileSize').value; | |
console.log(tileSize) | |
// Convert area to inches and divide by a single tile's area (ex 4x4 tile = 16), then divide by 144 to determine tiles needed. | |
var total = (sf * 144)/tileSize; | |
console.log(total) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The below functions take the single level array of items as an argument | |
* and turn it into a multidimensional array structure (tree), | |
* where each item has an array of sub-items. | |
* | |
* Each item should have at least an `id` and `parent_id`, | |
* where the `parent_id` is `0` if it's top level. | |
* | |
* Source: http://goo.gl/p2GybZ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key Sublime Text 3.2.1 Build 3207 | |
----- BEGIN LICENSE ----- | |
Member J2TeaM | |
Single User License | |
EA7E-1011316 | |
D7DA350E 1B8B0760 972F8B60 F3E64036 | |
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD | |
FA0A2ABE 25F65BD8 D51458E5 3923CE80 | |
87428428 79079A01 AA69F319 A1AF29A4 | |
A684C2DC 0B1583D4 19CBD290 217618CD |
This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.
VirtualHostX is a convenient way to manage development sites, but not required.
brew update
brew install php56
brew install php56-mcrypt
brew install mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The polling function | |
function poll(fn, timeout, interval) { | |
var endTime = Number(new Date()) + (timeout || 2000); | |
interval = interval || 100; | |
var checkCondition = function(resolve, reject) { | |
var ajax = fn(); | |
// dive into the ajax promise | |
ajax.then( function(response){ | |
// If the condition is met, we're done! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF | |
Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH | |
Keys are generic ones. These are the same from MSDN account. | |
Product Key : -6Q8QF | |
Validity : Valid | |
Product ID : 00369-90000-00000-AA703 | |
Advanced ID : XXXXX-03699-000-000000-00-1032-9200.0000-0672017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const head = [["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD","AE","AF","AG","AH","AI","AJ","AK","AL","AM","AN","AO","AP","AQ","AR","AS","AT","AU","AV","AW","AX","AY","AZ","BA","BB","BC","BD","BE","BF","BG","BH","BI","BJ"]] | |
const body = [ | |
["Rank", "Brand", "1", "", "2", "", "3", "", "4", "", "5", "", "6", "", "7", "", "8", "", "9", "", "10", "", "11", "", "12", "", "13", "", "14", "", "15", "", "16", "", "17", "", "18", "", "19", "", "20", "", "21", "", "22", "", "23", "", "24", "", "25", "", "26", "", "27", "", "28", "", "29", "", "30", ""], | |
["Profit", "PerM2/Grp", "1/2", "", "2/2", "", "3/2", "", "4/2", "", "5/2", "", "6/2", "", "7/2", "", "8/2", "", "9/2", "", "10/2", "", "11/2", "", "12/2", "", "13/2", "", "14/2", "", "15/2", "", "16/2", "", "17/2", "", "18/2", "", "19/2", "", "20/2", "", "21/2", "", "22/2", "", "23/2", "", "24/2", "", "25/2", "", "26/2", "", "27/2", "", "28/2", "", "29/2", "", "30/2", ""], | |
["Kode Bar |