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
array( | |
'ALABAMA'=> | |
array('ABBEVILLE','ADAMSVILLE','ADDISON','AKRON','ALABASTER','ALBERTVILLE','ALEXANDER CITY','ALEXANDRIA','ALICEVILLE','ALLGOOD','ALTOONA','ANDALUSIA','ANDERSON','ANNISTON','ARAB','ARDMORE','ARGO','ARITON','ARLEY','ASHFORD','ASHLAND','ASHVILLE','ATHENS','ATMORE','ATTALLA','AUBURN','AUTAUGAVILLE','AVON','BABBIE','BAILEYTON','BANKS','BAY MINETTE','BAYOU LA BATRE','BEAR CREEK','BEATRICE','BEAVERTON','BELK','BENTON','BERRY','BESSEMER','BILLINGSLEY','BIRMINGHAM','BLACK','BLOUNTSVILLE','BLUE MOUNTAIN','BLUE RIDGE','BLUE SPRINGS','BOAZ','BOLIGEE','BON AIR','BRANCHVILLE','BRANTLEY','BRENT','BREWTON','BRIDGEPORT','BRIGHTON','BRILLIANT','BROOKSIDE','BROOKWOOD','BRUNDIDGE','BUTLER','BYNUM','CAHABA HEIGHTS','CALERA','CAMDEN','CAMP HILL','CARBON HILL','CARDIFF','CAROLINA','CARROLLTON','CASTLEBERRY','CEDAR BLUFF','CENTER POINT','CENTRE','CENTREVILLE','CHALKVILLE','CHATOM','CHELSEA','CHEROKEE','CHICKASAW','CHILDERSBURG','CITRONELLE','CLANTON','CLAY','CLAYHATCHEE','CLAYTON','CLEVELAND','CLIO','COALING', |
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
// Update Mini Cart | |
$.post( | |
woocommerce_params.ajax_url, | |
{'action': 'mode_theme_update_mini_cart'}, | |
function(response) { | |
$('#mode-mini-cart').html(response); | |
} | |
); |
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 | |
require '../../vendor/autoload.php'; | |
$dotenv = new Dotenv\Dotenv(__DIR__ . '/..'); | |
$dotenv->load(); | |
?> |
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
## | |
# Caching | |
## | |
# Expire rules for static content | |
location ~* \.(?:manifest|appcache|html?|xml|json)$ { | |
expires -1; | |
# access_log logs/static.log; # I don't usually include a static log | |
} |
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
# Show top 10 biggest subdirs in the current dir. | |
du -sk * | sort -nr | head -10 | |
# Check if you have old kernels for deletion | |
ls -lh /boot | |
# Cleaning packages | |
sudo apt-get autoremove | |
sudo apt-get autoclean |
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
function abbrNum(number, decPlaces) { | |
decPlaces = Math.pow(10,decPlaces); | |
var abbrev = ['K', 'M', 'B', 'T']; | |
for (var i = abbrev.length - 1; i >= 0; i--) { | |
var size = Math.pow(10,(i+1)*3); | |
if (size <= number) { | |
number = Math.round(number * decPlaces / size) / decPlaces; |
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
.price {color:#fff; position:absolute; right:0; top:10px; height:48px; line-height:48px; padding:0 20px;} | |
.price:after {position:absolute; content:""; left:-12px; width:0px; height:0px; border-top:24px solid black; border-bottom:24px solid black; border-left:12px solid transparent;} | |
.price.red {background:#e1559a;} | |
.price.red:after {border-top-color:#e1559a; border-bottom-color:#e1559a;} | |
.price.blue {background:#329af2;} | |
.price.blue:after {border-top-color:#329af2; border-bottom-color:#329af2;} | |
.price.green {background:#a8d688;} |
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 | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Add custom fee to cart automatically | |
* | |
*/ | |
function woo_add_cart_fee() | |
{ |
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
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" |
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 | |
require_once('simplexlsx.class.php'); | |
$xlsx = new SimpleXLSX('test.xlsx', false, true); | |
$locations = array(); | |
foreach ($xlsx->rows(3) as $row) { | |
if ($row[6]) { | |
$locations[] = array( | |
'address' => str_replace('.', '', str_replace('#', '', $row[6])), |