- 计算机软硬件基础
- 计算机网络
- 操作系统
- 数据结构和算法
- 设计模式
- 以及其他各种你应该懂的东西
- 前端标准/规范
广告素材:http://imgad0.pconline.com.cn/ivy/image/201311/19/13848568762230.swf
分析环境
操作系统:OS X Mavericks
| gem 'kaminari' | |
| gem 'ransack' |
| @PageSpinner = | |
| spin: (ms=500)-> | |
| @spinner = setTimeout( (=> @add_spinner()), ms) | |
| $(document).on 'page:change', => | |
| @remove_spinner() | |
| spinner_html: ' | |
| <div class="modal hide fade" id="page-spinner"> | |
| <div class="modal-head card-title">Please Wait...</div> | |
| <div class="modal-body card-body"> | |
| <i class="icon-spinner icon-spin icon-2x"></i> |
| <?php | |
| /* | |
| OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
| Author: _ck_ (with contributions by GK, stasilok) | |
| Version: 0.1.7 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
| 0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
| <?php | |
| class Encoding { | |
| protected static $win1252ToUtf8 = array( | |
| 128 => "\xe2\x82\xac", | |
| 130 => "\xe2\x80\x9a", | |
| 131 => "\xc6\x92", | |
| 132 => "\xe2\x80\x9e", |
| #! /bin/bash | |
| LOGFILE=/var/log/nginx/access.log | |
| PREFIX=/etc/spiders | |
| #日志中大部分蜘蛛都有spider的关键字,但是百度的不能封,所以过滤掉百度 | |
| grep 'spider' $LOGFILE |grep -v 'Baidu' |awk '{print $1}' >$PREFIX/ip1.txt | |
| # 封掉网易的有道 | |
| grep 'YoudaoBot' $LOGFILE | awk '{print $1}' >>$PREFIX/ip1.txt | |
| #封掉雅虎 | |
| grep 'Yahoo!' $LOGFILE | awk '{print $1}' >>$PREFIX/ip1.txt | |
| # 过滤掉信任IP |
| # sudo ln -s ~/nginx.conf unicorn.conf | |
| upstream app_server { | |
| server unix:/tmp/unicorn_padrino.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| charset utf-8; | |
| server_name db.innshine.com; |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |