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
Remove Data Go Pricing (https://www.go-pricing.com/) plugin | |
global $wpdb; | |
$rows = $wpdb->get_results( "SELECT * FROM wp_posts where `post_type` = 'go_pricing_tables'"); | |
foreach ( $rows as $row ) | |
{ | |
wp_delete_post( $row->ID, true); | |
} |
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
1. Install the MySQL Community repository | |
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm | |
rpm -Uvh mysql-community-release-el6-5.noarch.rpm | |
2. Installing MySQL 5.6 | |
yum -y install mysql mysql-server | |
3. Verify the correct packages were installed | |
rpm -qa | grep mysql | |
it should be: | |
mysql-community-release-el6-5.noarch |
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
Create user deploy | |
sudo useradd deploy | |
sudo usermod -a -G sudo deploy | |
Login as deploy user | |
su deploy | |
Install RVM | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
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
# Client, generate a ssh key pair if needed | |
ssh-keygen | |
# Copy public key to server | |
ssh-copy-id username@IP | |
# Disable the Password for Root Login on server | |
sudo nano /etc/ssh/sshd_config | |
--> PermitRootLogin without-password | |
reload ssh |
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
add_action('template_redirect', 'redirect_to_cart_page'); | |
function redirect_to_cart_page() | |
{ | |
if (is_checkout() and !is_user_logged_in()) { | |
$carts = WC()->cart->get_cart(); | |
if (!empty($carts)) { | |
foreach ( $carts as $cart) |
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 | |
$serverName = 'localhost'; | |
$userName = 'root'; | |
$password = 'a'; | |
$dbName = 'test'; | |
$conn = new mysqli($serverName, $userName, $password, $dbName); | |
if ($conn->connect_error) { | |
die ('Connection failed' . $conn->connect_error); |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; |
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
import React, { Component, PropTypes } from 'react'; | |
import { View, Text, TouchableHighlight } from 'react-native'; | |
export default class MyScene extends Component | |
{ | |
static propTypes = { | |
title: PropTypes.string.isRequired, | |
onForward: PropTypes.func.isRequired, | |
onBack: PropTypes.func.isRequired, | |
} |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component, PropTypes } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
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 | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
NewerOlder