Categories
Apply to

INFJ-INTP Relationships & Compatibility: Part I

By Dr. A.J. Drenth Sometimes dubbed “the golden pair,” many have noted the potential for great compatibility and camaraderie in INTP-INFJ relationships. In this series of posts, we will explore some

Source: INFJ-INTP Relationships & Compatibility: Part I

Categories
Apply to

osx – Updating php version on mac – Stack Overflow

brew update && brew upgradebrew tap homebrew/dupesbrew tap homebrew/versionsbrew tap homebrew/homebrew-phpbrew unlink php56 brew install php71You might get an error if PHP 5.6 has not been installed by brew previously, but don’t worry, you can simply continue.You can also change the version to 7.0 by replacing the command from above commands brew install php71 to brew install php70.You can check the output by command.php -vIf the output of php -v still doesn’t echoes the version 7, simply type this command and hit enter in terminal.export PATH=/usr/local/php5/bin:$PATH

Source: osx – Updating php version on mac – Stack Overflow

Categories
Apply to

Building a settings import and export feature – Pippins Plugins

$settings = get_option( ‘pwsix_settings’ ); nocache_headers();header( ‘Content-Type: application/json; charset=utf-8’ );header( ‘Content-Disposition: attachment; filename=pwsix-settings-export-‘ . date( ‘m-d-Y’ ) . ‘.json’ );header( “Expires: 0” ); echo json_encode( $settings );exit;

Source: Building a settings import and export feature – Pippins Plugins

Categories
Apply to

How to Store Multi-dimensional Array in Mysql Using PHP

Json_encode():

This is one a good method, while playing with AJAX and PHP. Because now a days, AJAX is most popular one and needs to retrieve the results on the same page by processing the AJAX calls. Let’s start with an simple example. I dont code the database connections codes, just go with mysql query and how to apply the json  functions.

Serialize():This is also one a simple function to prepare array items as string.  The serialize() function will be like the json encoding. But there is some difference in encoded string. Its php functions.So you can use it inside the PHP and you can’t use it on AJAX like the json functions. But good to work with php. you can use the unserialize() function to get the original array backecho serialize($default_array); unserialize($encoded_array);That’s it.

Source: How to Store Multi-dimensional Array in Mysql Using PHP

Categories
Apply to

TUTORIAL: Developing Locally on WordPress with Remote Database Over SSH – Technosailor.com

Configuring WordPress to use the TunnelNow that we have a successful SSH tunnel, you have to configure WordPress to use it. In the wp-config.php file, simply modify the DB_HOST constant to read:1define( ‘DB_HOST’, ‘127.0.0.1:5555’ );You need to add two more variables, though, to override WordPress’ existing siteurl and home options to allow you to work with the localhost domain, instead of redirecting to the remotedomain.com that is configured in WordPress.123define( ‘WP_HOME’, ‘http://localhost’ );define( ‘WP_SITEURL’, ‘http://localhost’ );

Source: TUTORIAL: Developing Locally on WordPress with Remote Database Over SSH – Technosailor.com

Categories
Apply to

PHP + CSV -> Autodetect Delimiter (Example)

A protip by markus-perl about php, csv, delimiter, and csv delimiter.

Source: PHP + CSV -> Autodetect Delimiter (Example)

Categories
Apply to

(1) 5 Misconceptions About Carl Sagan – YouTube

Categories
Apply to

A Universe not made for us – Carl Sagan on Religion

Categories
Apply to

Customizer Options Theme_mod

There have been a ton of great features added to WordPress over the last few years, but undoubtedly my favorite is the Customizer API. Leveraging the Customizer is my go-to for any settings that a client may need to change or update.

Source: Jon Bellah

Categories
Apply to

Carl Sagan on religion – YouTube

0:43brought close to culmination in the0:44notion that we are created in God’s0:46image the creator and ruler of the0:50entire universe looks just like me0:54my what a coincidence how convenient and0:59satisfying the 6th century BC Greek1:03philosopher Xenophanes understood the1:06arrogance of this perspective here’s1:08what he said the Ethiopians make their1:11gods blacken snub-nosed the three scenes1:14say theirs have blue eyes and red hair1:17yes1:18and if oxen and horses or lions had1:22hands and could paint with their hands1:24and produce works of art as men do1:26horses would paint the forms of the gods1:29like horses and oxen like oxen one1:35philosopher asserted that he knew the1:38whole secret he surveyed the two