Skip to content

Instantly share code, notes, and snippets.

@chappyhome
chappyhome / gist:9204961
Created February 25, 2014 08:20
javascript, parent,弹出框js代码处理,点击按钮后返回数据到父窗口。
//tab
$.fn.TabADS = function() {
var obj = $(this);
var currentClass = "select";
var tabs = obj.find(".tab_hd").find("li");
var conts = obj.find(".tab_cont");
var t;
tabs.eq(0).addClass(currentClass);
conts.hide();
conts.eq(0).show();
@chappyhome
chappyhome / gist:8429066
Created January 15, 2014 01:13
GPG key Error while using yum
e problem solved by the advice from Installing RHEL EPEL Repo on Centos 5.x or 6.x
@chappyhome
chappyhome / new_gist_file_0
Created December 14, 2013 15:53
jar win7双击不能运行问题
1.修改环境变量path,把jre下的bin路径添加进去
2.修改注册表,把javaw的command open的字符串加入 "......javaw.exe" -jar "%1" %*
@chappyhome
chappyhome / new_gist_file_0
Created December 13, 2013 23:40
cannot install lxml in mac os 10.9
STATIC_DEPS=true pip install lxml
@chappyhome
chappyhome / new_gist_file_0
Created December 13, 2013 02:58
安装setuptools 失败
From http://www.oschina.net/question/1409342_134600
supmind
安装setuptools 失败
supmind 发表于 2013-11-24 15:57 19天前, 5回/274阅, 最后回答: 6天前
开源中国诚邀您参加 Cloud Foundry 中国群英会!(北京、上海、杭州、成都、深圳)
python版本2.7.6
setuptools版本1.4.1
@chappyhome
chappyhome / new_gist_file_0
Created November 29, 2013 07:31
No space left on device inode block
No space left on device
2013年8月2日默北发表评论阅读评论 Favorite加入收藏 | 收藏本站
一. 收到报警
线上有一台服务器磁盘检测告警了,提示空间不足。爬到服务器查看相关信息:
inode
/data分区只使用了71%,创建文件却提示磁盘空间不足,按理说不会出现这种情况的。难道inode耗尽?
@chappyhome
chappyhome / new_gist_file_0
Created November 25, 2013 06:21
rsync 出现的问题
1.code(5)一般都是用户验证的问题。
2.code(13)一般都是目录不够权限。
3.其他的可能是,删除对方的所有文件,给予该目录最大权限。。。一般也可以解决了。
@chappyhome
chappyhome / css_resources.md
Created November 25, 2013 01:20 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@chappyhome
chappyhome / javascript_resources.md
Created November 25, 2013 01:20 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@chappyhome
chappyhome / python_resources.md
Created November 25, 2013 01:20 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides