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 | |
remove_action('admin_notices', 'woothemes_updater_notice'); |
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 | |
$data_array = array ( | |
array ('1','2'), | |
array ('2','2'), | |
array ('3','6'), | |
array ('4','2'), | |
array ('6','5') | |
); | |
$csv = "col1,col2 \n";//Column headers |
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
on write_to_file(this_data, target_file, append_data) | |
try | |
set the target_file to the target_file as string | |
set the open_target_file to open for access file target_file with write permission | |
if append_data is false then set eof of the open_target_file to 0 | |
write this_data to the open_target_file starting at eof | |
close access the open_target_file | |
return true | |
on error | |
try |
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
#!/bin/bash | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
my-wpdb: | |
image: mariadb | |
ports: |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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
version: '2' | |
services: | |
db: | |
image: mysql:5.6 | |
ports: | |
- "4301:3306" | |
volumes: | |
- "./.data/db:/var/lib/mysql" | |
restart: always | |
environment: |
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
services: | |
haproxy: | |
image: haproxy:latest | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ${PWD}/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg | |
restart: always | |
networks: |
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
List of PHP 7 Packages: https://launchpad.net/ubuntu/+source/php7.0 | |
Disclaimer: I get unreliable results when I don't run these commands seperately and in order. | |
vagrant ssh | |
sudo apt-get update | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get install php7.0 | |
sudo apt-get update |
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
if(false == IVAN_OFFSET_DEBUG) { | |
// Register main theme styles and enqueue it. | |
// Hint: you can unregister it and replace by your own compiled version in a child theme. | |
wp_enqueue_style( 'ivan-theme-styles', get_template_directory_uri() . '/css/theme-styles'.$prefix.'.css', array(), '1' ); | |
} else { | |
wp_enqueue_script( 'webpack-dev-server', 'http://localhost:3002/webpack-dev-server.js', array(), null, false ); | |
wp_enqueue_script( 'webpack-bundle', 'http://localhost:3002/hmr/bundle.js', array(), null, false ); | |
} |