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
/* NEED https://gist.github.com/Hotfirenet/6059aa528800c1bb944fa5b7d8fcbf42 */ | |
TRUNCATE TABLE ps_connections; | |
TRUNCATE TABLE ps_connections_page; | |
TRUNCATE TABLE ps_connections_source; | |
TRUNCATE TABLE ps_customer_ip; | |
TRUNCATE TABLE ps_customer_message; | |
TRUNCATE TABLE ps_customer_thread; | |
TRUNCATE TABLE ps_mail; | |
TRUNCATE TABLE ps_message; |
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 reference FROM ps_product P | |
INNER JOIN ps_product_lang PL ON PL.id_product = P.id_product | |
WHERE P.active = 1 AND (PL.available_now IS NOT NULL AND PL.available_now <> '') | |
GROUP BY reference |
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
tell application "Finder" | |
set chemin to choose folder with prompt "Sélectionnez le dossier contenant les fichiers à renommer" | |
my inspecter(chemin) --appel routine avec transmission des variables | |
end tell | |
on inspecter(un_dossier) | |
-- récupération du nom du dossier | |
set ledossier to un_dossier as string | |
set ledossier to text 1 thru -2 of ledossier | |
set AppleScript's text item delimiters to {":"} |
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
#suppression de la metabox yoast seao sur un custom post type | |
add_action( 'add_meta_boxes', function() { | |
remove_meta_box('wpseo_meta', 'mycustomposttype', 'normal'); | |
},11 ); |
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
find /home/foo \( -name '.DS_Store' -or -name '._.DS_Store' -or -name '._*' -or -name '.TemporaryItems' -or -name '.apdisk' \) -exec rm -rf {} \; |
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
#trouver les fichiers linux, mac qui n'ont pas les caractères autorisé par Windows | |
find . -name '*[<>:/\\|?*]*' -o -name '*[ \.]' | |
#fonction de renommage en masse des fichiers linux, mac qui n'ont pas les caractères autorisé par Windows | |
#rename.sh | |
#!/usr/bin/env bash | |
find "$1" -depth -print0 | while IFS= read -r -d '' file; do | |
d="$( dirname "$file" )" | |
f="$( basename "$file" )" |
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
#!/usr/bin/env bash | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT |
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
location ~* \.(gif|png|jpe?g)$ { | |
expires 7d; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
# prevent hotlink | |
valid_referers none blocked ~.google. ~.bing. ~.yahoo. server_names ~($host); | |
if ($invalid_referer) { | |
rewrite (.*) /static/images/hotlink-denied.jpg redirect; | |
# drop the 'redirect' flag for redirect without URL change (internal rewrite) |
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 | |
//By: Hotfirenet | |
//Description Shortcode: List post, cpt, published between 2 dates | |
//Use: [recap_article type="post,guide" datedebut="2016-01-31" datefin="2016-02-28" limit=5] | |
//For: domadoo blog | |
add_shortcode( 'recap_article', function( $atts ) { | |
extract( shortcode_atts( array( | |
'type' => 'post', |
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
#!/usr/bin/env bash | |
#Automation script By Hotfirenet to install ufw (firewall) | |
#NEED ROOT | |
#Use curl -sSL https://gist.githubusercontent.com/Hotfirenet/acd59a8c31de631220afe42cb4025a19/raw/05698e1a230783a9894b2df330296f91e9240d67/ufw-firewall.sh | bash | |
#installation | |
apt-get update | |
apt-get -y install ufw |