Skip to content

Instantly share code, notes, and snippets.

View phamngsinh's full-sized avatar

Pham Ng Sinh phamngsinh

View GitHub Profile
/*
* WP REST API version 2.0-beta7
* API base url ishttp://www.example.com/wp-json
*
* Reference
* https://developer.wordpress.org/rest-api/reference/media/
*
* Description
* an example of loading image to WordPress API using Guzzle
* inspired by s-hiroshi's gist at https://gist.github.com/s-hiroshi/3477e07454d809b9d38f
/*
* WP REST API version 2.0-beta7
* API base url ishttp://www.example.com/wp-json
*
* Reference
* https://wordpress.org/support/topic/new-post-with-image
*/
/*
* Get Guzzle HTTP Client. That client has been authenticated.
*/
@phamngsinh
phamngsinh / gist:9a49cd415c78aff22c629422fb617920
Created July 13, 2017 10:08 — forked from croxton/gist:4073583
Install xdebug 2.2.0 for AMPPS on OSX
Grab the 'PHP Remote Debugging Client' (the pre-complied xdebug binary for OSX) from here:
http://code.activestate.com/komodo/remotedebugging/
Unzip it, find the folder that corresponds to the version of PHP you want to install it for and copy the xdebug.so file from there into your php extensions folder in the relevant PHP version directory. E.g. for PHP 5.4:
/Applications/AMPSS/php-5.4/lib/extensions/ext/
Now open PHP.ini in a text editor:
/Applications/AMPSS/php-5.4/etc/php.ini
@phamngsinh
phamngsinh / aws-certification.md
Created September 7, 2016 16:37 — forked from miglen/aws-certification.md
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams

AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.
  • Good knowledge of disaster recovery, security and High availability architectures.

If you do not have prior hands-on experience and knowledge or you have little knowledge about AWS services, it is better to take an online course. If you already have experience in architecting solutions on AWS it is not necessary to take an online course.

@phamngsinh
phamngsinh / golang tuts
Last active November 1, 2015 15:53 — forked from honkskillet/byte-sizetuts.md
A series of golang tutorials with youtube videos.
# byte-size tuts
by alexander white ©
## golang tutorials
- [0 - installation on a Mac](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-0---installation-on-a-mac)
- [1 - packages](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-1---packages)
- [2 - remote packages](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-2---remote-packages)
- [3 - variable syntax](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-3---variable-syntax)
- [4 - functions syntax](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-4---functions-syntax)
- [5 - loops syntax](https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6#golang-5---loops-syntax)