- 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
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | json.dumps在默认情况下,对于非ascii字符生成的是相对应的字符编码,而非原始字符,例如: | |
| >>> import json | |
| >>> js = json.loads('{"haha": "哈哈"}') | |
| >>> print json.dumps(js) | |
| {"haha": "\u54c8\u54c8"} | |
| 解决办法很简单: | |
| >>> print json.dumps(js, ensure_ascii=False) | 
- 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.
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function permutations(list) | |
| { | |
| // Empty list has one permutation | |
| if (list.length == 0) | |
| return [[]]; | |
| var result = []; | |
| for (var i=0; i<list.length; i++) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /*jslint sloppy:true, white:true, vars:true, plusplus:true */ | |
| var permutation = function (collection){ | |
| var current, | |
| subarray, | |
| result = [], | |
| currentArray = [], | |
| newResultArray = []; | |
| if (collection.length){ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Build dependencies for OpenResty. | |
| sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev | |
| # Install standard Nginx first so that you get the relevant service scripts installed too | |
| sudo apt-get install nginx | |
| # If you want to access Postgres via Nginx | |
| sudo apt-get install libpq-dev | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| apt-get -y update | |
| apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev | |
| wget -c https://openresty.org/download/openresty-1.11.2.1.tar.gz | |
| tar zxvf openresty-1.11.2.1.tar.gz | |
| cd openresty-1.11.2.1 | |
| ./configure \ | |
| --sbin-path=/usr/sbin/nginx \ | |
| --conf-path=/etc/nginx/nginx.conf \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Windows平台下载Android源码(整理) | |
| Google官方下载源码使用的系统Ubuntu系统,不过现在我们需要在Windows系统中下载Android源码文件。 | |
| 网站的地址是:https://android.googlesource.com/ | |
| 里面包括Android系统各个部分的源码,我们只需要下载platform就行 | |
| 地址是:https://android.googlesource.com/platform/manifest | |
| 1.准备工作 | |
| Android的源代码管理使用的是Git,所以安装Git必不可少,Windows系统中使用的是mysysgit目前的版本是Git-1.9.5-preview20150319.exe,自行搜索下载。源代码下载是使用Python脚本来完成的,所以还需要安装一个python环境。 | |
| 2.下载XML描述文件 | |
| 进入一个文件夹,用来存储XML描述文件,打开Git Bash执行如下命令 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | badblocks | |
| You can check for badblocks running the command | |
| sudo badblocks -nsv /dev/[device-partition] > bad-blocks-result for a non-destructive read-write test. That will generate a file called bad-blocks-result with the sectors damaged. | |
| -n Use non-destructive read-write mode. By default only a non-destructive read-only test is done. | |
| -s Show the progress of the scan by writing out rough percentage completion of the current badblocks pass over the disk. | |
| -v Verbose mode. | |
| Then, you can run sudo fsck -t ext3 -l bad-blocks-result /dev/[device-partition] to tell the file system where the bad sectors are and move data away from them, if possible. | 
OlderNewer