pecl channel-update pecl.php.net
pecl clear-cache
pecl install xdebug
This file contains hidden or 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
xdebug.mode=debug | |
xdebug.start_with_request=yes | |
xdebug.use_compression=false | |
xdebug.client_port=9002 | |
xdebug.show_local_vars=1 | |
xdebug.discover_client_host=true |
This file contains hidden or 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
<style>#html-body [data-pb-style=C8PG98K]{justify-content:center;display:flex;flex-direction:column;background-position:center center;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;border-style:none;border-width:1px;border-radius:0;margin:0;padding:0}#html-body [data-pb-style=KN3WQ28]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=YBA15C5]{background-color:transparent}#html-body [data-pb-style=VPAQ1CW]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=R6L3U04]{background-color:transparent}#html-body [data-pb-style=C64VV8P]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=NULGWPY]{background-color:transparent}#html-body [data-pb-style=HRBNL8W]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=DFYRHRV]{background-color:transparent}#html-body [data-pb-style=I4M |
This file contains hidden or 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
<style>#html-body [data-pb-style=GA07O8L]{justify-content:center;display:flex;flex-direction:column;background-position:center center;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;border-style:none;border-width:1px;border-radius:0;margin:0;padding:0}#html-body [data-pb-style=Y2B806E]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=Q4XNPF9]{background-color:transparent}#html-body [data-pb-style=JLNU1IU]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=V4NWTIG]{background-color:transparent}#html-body [data-pb-style=KGMB7EC]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=LCOLAPC]{background-color:transparent}#html-body [data-pb-style=N4PITBE]{background-position:left top;background-size:cover;background-repeat:no-repeat}#html-body [data-pb-style=H0MLAGD]{background-color:transparent}#html-body [data-pb-style=IU7 |
This file contains hidden or 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
#!/bin/bash | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.26 | |
php -r "unlink('composer-setup.php');" |
This file contains hidden or 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
;; if you're using zend server, you may need to | |
;; 1 - remove/disable etc/conf.d/debugger.ini | |
;; 2 - comment zend.ini_scandir=... altogether | |
;; | |
;; I've had success with both :| | |
;; on zend server, install xdebug via pecl | |
;; or if you feel brave, checkout the source | |
;; and build it yourself (check the README, | |
;; watch out for the necessary configurations before make) |
This file contains hidden or 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
// Source: https://gist.github.com/luetkemj/2023628 | |
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz | |
<?php | |
$args = array( | |
//////Author Parameters - Tham số lấy bài viết theo tác giả | |
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters | |
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20) | |
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả | |
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
This file contains hidden or 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 | |
class Map { | |
/* $table = [ | |
* 'encrypt' => | |
* ['A' => 'A', 'B' => 'B', ...], | |
* ['A' => 'B', 'B' => 'C', ...], | |
* ... | |
* 'decrypt' => | |
* ['A' => 'A', 'B' => 'B', ...], |
This file contains hidden or 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 | |
/* | |
* @see https://www.codewars.com/kata/gap-in-primes/train/php | |
*/ | |
function gap( $g, $m, $n ) | |
{ | |
$prime = FALSE; |
NewerOlder