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
SELECT CONCAT( | |
(zone.`livraison_zone_poids_max`) /1000, | |
':', | |
(zone.`livraison_zone_prix`) / 1.2, | |
',' | |
) | |
FROM `livraison_zone` AS zone | |
INNER JOIN livraison AS liv ON liv.livraison_id = zone.livraison_id | |
WHERE liv.livraison_code = "GLS" | |
ORDER BY zone.`livraison_zone_poids_max` ASC |
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 | |
/** | |
* Generate Switch Images for Magento | |
* cp out/* media/wysiwyg/swatches | |
*/ | |
$x = 21; | |
$y = 21; | |
$colors = array( | |
'Lemon yellow' => '#FFE500', | |
'Sunflower yellow' => '#FFAE00', |
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 | |
$dc = "173.194.44.35"; | |
$tld = "com"; | |
$ch = curl_init("http://" . $dc); | |
curl_setopt($ch, CURLOPT_HEADER, "Host: www.google." . $tld); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 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
<?php | |
/** | |
* Map Special Characters to avoid problems with Fedex API | |
* | |
* @param string|array $input input | |
* | |
* @return string | |
*/ | |
public function mapSpecialCharacters($input) | |
{ |
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/sh | |
display_usage() { | |
echo "This script must be run with super-user privileges." | |
echo -e "\nUsage:\n$0 ip [interface] \n" | |
echo -e "\nExample:\n$0 192.168.0.1 eth1 \n" | |
} | |
# if less than one argument supplied, display usage | |
if [ $# -le 0 ] | |
then | |
display_usage |
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
var colors = ["Sky blue","Antique violet","..."]; | |
var i = 1; | |
colors.each(function(color) { | |
console.log(color, i); | |
jQuery('button#add_new_option_button').click(); | |
jQuery('td.col-option_' + i + ' > input').val(color); | |
i++; | |
}); |
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
http://lavoweb.net/wp-content/themes/lavowebnet/images/logo/referencement_magento_grand.png | |
http://lavoweb.net/wp-content/themes/lavowebnet/images/featured-image1.png |
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
SET FOREIGN_KEY_CHECKS = 0; | |
SET GROUP_CONCAT_MAX_LEN=32768; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = (SELECT DATABASE()); | |
SELECT IFNULL(@tables,'dummy') INTO @tables; | |
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables); | |
PREPARE stmt FROM @tables; |
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
<script> | |
jQuery('body, html').css({ | |
'background-image': 'url(https://source.unsplash.com/category/nature/' + jQuery(window).width() + 'x' + jQuery(window).height() + ')', | |
'background-size': jQuery(window).width() + 'px ' + jQuery(window).height() + 'px' | |
}); | |
</script> |
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
# Autodetect text files | |
* text=auto | |
# Force the following filetypes to have unix eols, so Windows does not break them | |
*.* text eol=lf | |
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain | |
*.DOCX diff=astextplain |
OlderNewer