Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Demonchy fusco

🎯
Focusing
Block or report user

Report or block fusco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fusco
fusco / vsftp.sh
Created Mar 4, 2014
gestion vsftp
View vsftp.sh
#!/bin/sh
# =============================================================================
#
# File .....: vsftp_am.sh - Manage virtual user accounts for vsftp
# Date .....: 23/06/2007
#
# -------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@fusco
fusco / phishing
Created Mar 19, 2014
phishing la banque postale
View phishing
Delivered-To: xxxxxxx@gmail.com
Received: by 10.64.236.1 with SMTP id uq1csp233795iec;
Tue, 18 Mar 2014 23:48:03 -0700 (PDT)
X-Received: by 10.14.127.4 with SMTP id c4mr1900895eei.86.1395211682794;
Tue, 18 Mar 2014 23:48:02 -0700 (PDT)
Return-Path: <postmaster@ilic.cz>
Received: from uvirt1.active24.cz (ipv6.uvirt1.active24.cz. [2a02:4a8:ac24:102::96:66])
by mx.google.com with ESMTP id u5si25398721een.53.2014.03.18.23.48.01
for <xxxxxxxx@gmail.com>;
View Magento How to get the customer login, logout, register and checkout urls.php
login url
<?php echo Mage::getUrl('customer/account/login'); ?>
logout url
<?php echo Mage::getUrl('customer/account/logout'); ?>
My Account url
<?php echo Mage::getUrl('customer/account'); ?>
Register url
@fusco
fusco / kmix_reset.sh
Created Sep 4, 2011
kmix reset user config
View kmix_reset.sh
#!/bin/bash
killall -9 kmix
rm -rf $(kde4-config --localprefix)/share/apps/kmix/
rm -f $(kde4-config --localprefix)/share/config/kmix*
kmix &
View override.rb
# lib/override.rb
module Ckeditor
module Helpers
module Controllers
extend ActiveSupport::Concern
def ckeditor_authenticate
authenticate_employee!
end
View function.js
$(document).ready(function(){
$("#Bloc_Newsproducts").hide();
$("#displayNewsproducts").click(function () {
$("#Bloc_Newsproducts").slideToggle("slow");
});
});
View query.sql
EXPLAIN SELECT p.*, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`name`, tax.`rate`, i.`id_image`, il.`legend`, m.`name` manufacturer_name ,( SELECT SUM(weight) FROM ps_search_word sw LEFT JOIN ps_search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = 2 AND si.id_product = p.id_product AND (sw.word LIKE 'oxyd%') ) position, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL 20 DAY)) > 0 new FROM ps_product p INNER JOIN `ps_product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = 2) LEFT JOIN `ps_tax_rule` tr ON (p.`id_tax_rules_group` = tr.`id_tax_rules_group` AND tr.`id_country` = 8 AND tr.`id_state` = 0) LEFT JOIN `ps_tax` tax ON (tax.`id_tax` = tr.`id_tax`) LEFT JOIN `ps_manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1) LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 2) WHERE p.`id_product` IN (10320,10320,7655,7645,7646,764
View query.sql
# Time: 111113 19:34:31
# Query_time: 135.645604 Lock_time: 0.000054 Rows_sent: 2353 Rows_examined: 71471585
SET timestamp=1321209271;
SELECT DISTINCT `id_product`
FROM `ps_search_word` sw
LEFT JOIN `ps_search_index` si ON sw.`id_word` = si.`id_word`
WHERE sw.`id_lang` = 2
AND sw.`word` LIKE 'co%';
View install.txt
Installation :
-------------
- décompresser l'archive dans le répertoire 'modules' de prestashop
- activer le module dans le backoffice de prestashop
- dans le fichier "Cart.php" (dans le répertoire "/classes/") ajoutez ces lignes :
include_once(dirname(__FILE__).'/../modules/freeshipping/freeshipping.php');
$fsz = new FreeShipping();
if ($fsz->checkFreeShippingPriceCart($this, $id_zone, $carrier)) return $shipping_cost;
dans la fonction "getOrderShippingCost", après la ligne :
$configuration = Configuration::getMultiple(array('PS_SHIPPING_FREE_PRICE', 'PS_SHIPPING_HANDLING', 'PS_SHIPPING_METHOD', 'PS_SHIPPING_FREE_WEIGHT'));
@fusco
fusco / df_h.log
Created Mar 11, 2012
adb shell AIO_meldrak_mod
View df_h.log
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 202.8M 32.0K 202.7M 0% /dev
tmpfs 202.8M 0 202.8M 0% /mnt/asec
tmpfs 202.8M 0 202.8M 0% /mnt/obb
/dev/block/mtdblock3 250.0M 132.7M 117.3M 53% /system
/dev/block/mtdblock5 147.6M 127.6M 20.0M 86% /data
/dev/block/mtdblock4 40.0M 1.1M 38.9M 3% /cache
/dev/block/mmcblk0p2 294.7M 18.4M 261.1M 7% /sd-ext
/dev/block/vold/179:1
You can’t perform that action at this time.