#Country ban with UFW#
Grab your different country ip addresses and save as Linux IPTables
http://www.ip2location.com/free/visitor-blocker
##Add country## Run the following command
alias composer="php /usr/local/bin/composer.phar" |
/*---------------------------------------------------------------------------- | |
@group Mixins | |
----------------------------------------------------------------------------*/ | |
// Creates a background image with width and height dynamically. | |
// | |
// $_img - The path to the image. | |
// | |
// Compatible in IE8+, Firefox 2+, Safari 4+. | |
@mixin knockout($_img) { |
config.json | |
reading-image.png |
config.json | |
reading-image.png |
# Run in a shell for each service | |
port="6379" # REDIS Port: 6379 | |
#port="27017" # MONGO Port: 27017 | |
server="servername.com" | |
iptables -A INPUT -s $servername.com -p tcp -m tcp --dport $port -j ACCEPT | |
iptables -A INPUT -s localhost -p tcp -m tcp --dport $port -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport $port -j DROP | |
# Control your Rules with iptables -L |
/* Expect the hover class to be on the body | |
before doing any hover effects */ | |
.hover .block:hover { | |
… | |
} |
<?php | |
// Use the code inside rule conditions with a Custom PHP code | |
// FIELD_MACHINE_NAME example: field_product_free_shipping | |
global $user; | |
$commerce_order = commerce_cart_order_load($user->uid); | |
$line_items = $commerce_order->commerce_line_items['und']; | |
foreach ($line_items as $lid) { | |
$line_item = commerce_line_item_load($lid['line_item_id']); | |
if ( isset($line_item->commerce_product)) { | |
$pid = $line_item->commerce_product['und'][0]['product_id']; |
#Country ban with UFW#
Grab your different country ip addresses and save as Linux IPTables
http://www.ip2location.com/free/visitor-blocker
##Add country## Run the following command
{ | |
"title": "TIC Dashboard", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "severity=info", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0, |
<?php | |
ini_set('display_errors', '1'); | |
error_reporting(E_ALL); | |
// Bootstrap Magento | |
require '../magento/app/Mage.php'; | |
Mage::app('admin', 'store'); | |
try{ | |
$catalogPriceRule = Mage::getModel('catalogrule/rule'); |