Month: November 2015

Linux 死机了怎么办

今天在 Linuxgem.org 上面发现一篇很有意思的文章,和大家分享。 {Via http://blog.upsuper.org.cn/what-to-do-if-linux-crash/} Linux 会死机么?我可以很肯定地说,会!要让 Linux 死机很容易,但难的是在死机以后如何安全的让他摆脱死机状态,本文讲述如何从 Linux 的死机状态中挣脱出来。 Linux 死机有很多种情况,最常见的是系统负载过高导致的。如上次介绍的 fork 炸弹就是这个原理,此外还可以运行内存耗用极大的程序(如虚拟机),也会迅速提升系统负载。由于系统负载过高导致的卡死,一定是解决的越快越好!此时必须记住的是,不能再试图依赖任何图形… Read More

Bootstrap 3 移除输入框聚焦线 How to remove border (outline) around text/input boxes?

一般可以用: textarea:focus, input:focus{ outline: 0; } 或者 *:focus { outline: 0; } 来源:http://stackoverflow.com/a/3397158   针对bootstrap可以用一下css来覆盖: .form-control:focus { border-color: inherit; -webkit-box-shadow: none; box-shadow: none; } 来源:http://stackoverflow.com/a/21924857   本文:Bootstrap 3 移除输入框聚焦线 How to remove border (outl… Read More

How to fix “System program problem detected” error on Ubuntu

Remove crash report files The apport system creates crash report files in the /var/crash directory. These crash report files cause the error message to appear everytime Ubuntu boots. $ cd /var/crash $ ls _opt_google_chrome_chrome.1000.crash _usr_lib_chromium-browser_chromium-browser.1000.crash _usr_sbin_ulatencyd.0.crash _usr_share_ap… Read More

Ubuntu: 创建PlayOnLinux快捷键 Create PlayOnLinux Application Desktop

实例一 iTunes 12 iTunes 12.desktop [Desktop Entry] Encoding=UTF-8 Name=iTunes 12 Comment=PlayOnLinux Type=Application Exec=/usr/share/playonlinux/playonlinux --run "iTunes 12" %F Icon=/home/gd/.PlayOnLinux//icones/full_size/iTunes 12 Name[fr_FR]=iTunes 12 StartupWMClass=iTunes.exe Categories=   实例二 Adobe Photoshop CS6 Adob… Read More

Magento 自定义分页代码 How to change pagination design in product listing page in magento

I have worked in the template\catalog\product\list\toolbar.phtml where you can change the total toolbar design. But there have a function <?php echo $this->getPagerHtml() ?> it’s for the pagination. if you want to change pagination html then go to the template\page\html\pager.phtml and you can change it from here.   本文:Magent… Read More

jQuery 去除表单空值 serialize how to eliminate empty fields

1.  Try adding this $('input', '#submForm').each(function(){ $(this).val() == "" && $(this).remove(); }) OR $('input:text[value=""]', '#submForm').remove(); before var serialized = $('#submForm').serialize() 来源:http://stackoverflow.com/a/6240625 You cannot use attribute selector for value as it is a changing property. 2. Use .… Read More

Linux Netcat 命令——网络工具中的瑞士军刀

netcat是网络工具中的瑞士军刀,它能通过TCP和UDP在网络中读写数据。通过与其他工具结合和重定向,你可以在脚本中以多种方式使用它。使用netcat命令所能完成的事情令人惊讶。 netcat所做的就是在两台电脑之间建立链接并返回两个数据流,在这之后所能做的事就看你的想像力了。你能建立一个服务器,传输文件,与朋友聊天,传输流媒体或者用它作为其它协议的独立客户端。 下面是一些使用netcat的例子. [A(172.31.100.7) B(172.31.100.23)] Linux netcat 命令实例: 1,端口扫描 端口扫描经常被系统管理员和黑客用来发现在一些机器上开放的端口,帮助他们识别系统中的漏洞。 $n… Read More

Magento 获取系统设置 How to get data from Magento System Configuration

I just wandering on how I can get the configuration data for my custom module. The configuration can be set from the admin system->configuration and how to pull it in frontend? 解决: $configValue = Mage::getStoreConfig('sectionName/groupName/fieldName'); sectionName, groupName and fieldName are present in etc/system.xml file of your module. The… Read More

Magento: 解决 Bootstrap 3 与prototype并用的时候, 下拉菜单消失的问题 Bootstrap 3 dropdown menu disappears when used with prototype.js

方法一 :  使用友善的文件 EASY FIX: Just replace Magento’s prototype.js file with this bootstrap friendly one: https://raw.github.com/zikula/core/079df47e7c1f536a0d9eea2993ae19768e1f0554/src/javascript/ajax/original_uncompressed/prototype.js You can see the changes made in the prototype.js file to fix the bootstrap issue here: https://… Read More