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 | |
error_reporting(1); | |
ini_set('max_execution_time', 0); | |
use \Magento\Framework\App\Bootstrap; | |
require_once '/var/www/html/app/bootstrap.php'; | |
$bootstrap = Bootstrap::create(BP, $_SERVER); | |
$objectManager = $bootstrap->getObjectManager(); |
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 | |
$args = array( | |
'posts_per_page' => 5, | |
'offset' => 0, | |
'category' => '', | |
'category_name' => '', | |
'orderby' => 'date', | |
'order' => 'DESC', | |
'include' => '', |
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
SELECT * FROM `catalog_product_entity` AS a | |
LEFT JOIN `catalog_product_entity_media_gallery` AS b ON a.entity_id = b.entity_id | |
WHERE b.value IS NULL |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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 | |
DIRECTORY="/Applications/PilotKit/Sites" | |
cd ${DIRECTORY} | |
# | |
if [ -d "$DIRECTORY" ]; then | |
echo 'removing existing directory phpmyadmin' | |
rm -rf ${DIRECTORY}/phpmyadmin | |
else |
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 | |
# Installing the Xcode command line tools on 10.7.x or higher | |
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}') | |
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress" | |
# Installing the latest Xcode command line tools on 10.9.x or higher | |
if [[ "$osx_vers" -ge 9 ]]; then |
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
#!/usr/bin/env bash | |
USER=$(logname) | |
osascript -e 'display notification "Fixing PilotKit files and core." with title "PilotKit"' | |
# fix scripts permissions | |
sudo chmod 777 /Applications/PilotKit/core/shell/repair/repair.sh | |
sudo chown -R "${USER}":admin /Applications/PilotKit |
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
#!/usr/bin/env bash | |
#install php: | |
##https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions | |
#--------------- | |
# bash <(curl -Ls https://git.io/vyeNE) | |
#PHP 7.1 (Current stable) - 10.10 and later | |
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1 |
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 | |
// Get the WooCommerce Shop URL | |
$store_url = get_site_url(); | |
// Action to perform: lets add product to cart | |
$action = "/?add-to-cart="; | |
// The product ID that we want to add. | |
$productID = "375"; |
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
<a id="buy" href="#">Buy this!</a> | |
<script> | |
$('#buy').click(function(e) { | |
e.preventDefault(); | |
addToCart(19); | |
return false; | |
}); | |
function addToCart(p_id) { | |
$.get('/wp/?post_type=product&add-to-cart=' + p_id, function() { |
NewerOlder