Skip to content

Instantly share code, notes, and snippets.


David Demonchy fusco

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 /
Created Sep 4, 2011
kmix reset user config
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
View function.js
$("#displayNewsproducts").click(function () {
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 :
$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 / 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
fusco / update_error.log.sql
Created Apr 4, 2012
View update_error.log.sql
SET NAMES 'utf8'
SET NAMES 'utf8'
INSERT IGNORE INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_RESTRICT_DELIVERED_COUNTRIES', '0', NOW(), NOW())
UPDATE `ps_country_lang` SET `name` = 'United States' WHERE `name` = 'United State'
ALTER TABLE `ps_discount` ADD `include_tax` TINYINT(1) NOT NULL DEFAULT '0'
View Order.php
class Order extends OrderCore
public function getProductsDetail()
View article.rb
class Article < ActiveRecord::Base
belongs_to :employee, :foreign_key => :employee_id
# require gem globalize3
translates :title, :content, :permalink, :keyword, :description
attr_accessible :title, :content, :keyword, :description, :published_at, :published, :comment_status, :employee_id, :status
before_validation :define_permalink
validates_presence_of :title, :content, :keyword, :description, :published_at
You can’t perform that action at this time.