Month: November 2015

Ubuntu 安装截图工具Shutter,并设置快捷键 Ctrl+Alt+A

一、Ubuntu安装截图工具 Shutter 1. 添加安装包软件源 sudo add-apt-repository ppa:shutter/ppa 2. 更新源并安装 shutter sudo apt-get update sudo apt-get install shutter 3. 搜索 shutter 可看到已安装成功 二、设置 Shutter 快捷键 1. 打开系统设置 2. 打开 Keyboard 键盘设置 3. 添加成功的状态 4. 单击右侧 Disabled,然后快速按下 Ctrl+Alt+A 如下图 5. Ctrl+Alt+A 测试OK。 ps: 1. 里面的快捷键命令用:shutter -s 或者shutter –select 2. 截取当前活动窗口:shutter… Read More

Linux/Ubuntu: 使用 trash-cli 防止 rm 命令误删除重要文件

曾几何时,一条 rm -rf /useless /* 命令干掉了我们需要的文件,也干掉的整个系统, 这是是不是与哭无泪啊。 像这种使用 rm 命令误删除文件的情况,我们会注意,但是我们不能保证百分百的不会 出现这种情况,毕竟事情总有偶然,那么对于这种情况我们是不是就束缚无策呢,不!我们有相应 的解决办法,那就是使用 trash-cli。trash-cli是一个使用 python 开发的软件包,包含 trash-put、 restore-trash、trash-list、trash-empty、trash-rm等命令,我们可以通过这写命令,将文件移动到回收站,或者还原 删除了的文件。 trash-put命令会把我们想要删除的文件移… Read More

Ubuntu: 一个命令行下的翻译工具

A translate tool in your command line, inspired by Fanyi. Installation // sudo apt-get install ruby // 前提是已经安装了ruby $ sudo gem install fy Usage Translation data is fetched from fanyi.youdao.com, and only support translation between Chinese and English. Translate one word. $ fy love love [ lʌv ] - n. 恋爱;亲爱的;酷爱;喜爱的事物;爱情,爱意;疼爱;热爱;爱人,所爱之物 - v. 爱,热爱;爱戴;赞美,… Read More

Magento 创建唯一优惠券 Create unique coupon code in Magento

Toni from ICG wrote a post how to create simple A/B split testing for offline promotions for online store. Now we will show you how to manage coupon codes trough Magento and prepare for your next “offline” campaign. Under Magento administration, first go to System -> Configuration -> Customer -> Promotions and create initial settings which wil…

Magento批量生成优惠券

使用Magento后台手动生成优惠券,效率太低了。如果生成1万个号码不一样的优惠券,还是要靠代码。 我来分享一段从互联网获得的批量生成优惠券的代码,如下: 此代码在Magento外部运行,所有使用了require_once(‘app/Mage.php’); 此代码只是一个生成优惠券的演示,如果要实现具体的功能,还需要修改,但是有了这个demo就容易多了。 示例1: <?php require_once('app/Mage.php'); Mage::app('default'); function generateUniqueId($length = null) { $rndId = crypt(uniqid(rand… Read More

移除magento投票栏 How to remove magento poll block

Magento is nowadays the most known CMS if we are talking about eCommerce. We all know that a magento store have at its base blocks. Category blocks, Subcategories blocks, polls block, manufacturers blocks and more. Todays question for Stanley is: How to remove a default magento block like: Mangento poll block? In a Magento webstore you

Magento 添加评论 How to add Magento Product Reviews form anywhere on product page

Product reviews helps in boosting customer’s confidence in your product. No points for guessing why they are one of the primary driving force behind conversion. Amazon is a great example of product reviews where a majority of the products are sold due to efficient reviews posted by their consumers. To show the review form and product

Magento 移除标签 How to remove “Tags” block from a product page

This tutorial will show you how to remove Tags block from Magento product pageЖ There are 2 ways of removing the tagging feature from product pages: Navigate to System -> Configuration -> Advanced tab. Set ‘Mage_Tag’ to ‘Disable’Ж Open the tag.xml under app/design/frontend/default/themeXXX/layout/ folder.Locate this line: ‘catalog_product… Read More

Magento 购物车不能加载付款栏 Magento 1.8 and 1.9 Payment not loading on Checkout

I’ve updated one of my stores to the new version 1.8.0 of Magento and all was great until I try the checkout. On the customer onepage checkout I just stuck on step Shipping Method, I could not get the payment information working. After look in everywhere I found out it was just an update on the

Magento 开启星级评价 How to add the yellow star rating system

It’s a common practice to use ratings for the products in the shopping website. This way visitors can rate the products according to their quality. By collecting rating results, website owners are able to summarize which products are best rated and therefore, provide more selling products. Also, it tends to attract more visitors for the

Linux/Ubuntu: 命令行任务(To-Do List)管理 task – A command line todo manager

安装: sudo apt-get install task $ task add some very important task $ task You can also install vit if you want an alternative UI to this list. There are also some command line tools for managing your agenda. 你也可以安装 VIT 查看内容 sudo apt-get install vit 用法:http://manpages.ubuntu.com/manpages/maverick/man1/task.1.html 官网:http://taskwarrior.org/ 实例: 30 Sec… Read More

论GNU、Linux和GNU/Linux之间的关系

相信很多人看到了这个标题就会产生疑问,这篇文章到底要讲什么东西?在回答这个问题之前,我先提出几个问题? 1. 什么是Linux? 2. 什么是GNU? 3. GNU/Linux是什么玩意儿? 在回答了以上问题后,大家自然也清楚我想说明的问题了。 什么是Linux 相信了解一些IT知识的人都听过Linux这个名词。维基百科上的Linux词条是最经典和最准确的说明(http://zh.wikipedia.org/wiki/Linux),在此直接应用,免去班门弄斧之嫌。 Linux操作系统(Linux),是一种计算机操作系统。Linux操作系统的内核的名字也是“Linux”。Linux操作系统也是自由软件和开放源… Read More