A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
| // Sample file using the Google C++ coding standard. | |
| // | |
| // http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml | |
| // | |
| // General rules: | |
| // - Indents are two spaces. No tabs should be used anywhere. | |
| // - Each line must be at most 80 characters long. | |
| // - Comments can be // or /* but // is most commonly used. | |
| // - File names should be lower_case.c or lower-case.c | |
| // |
| :: 启动后需要保留窗口, 关闭窗口则结束进程 | |
| aria2c --conf-path=aria2.conf -D |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: aria2 | |
| # Required-Start: $local_fs $remote_fs | |
| # Required-Stop: $local_fs $remote_fs | |
| # Should-Start: $network | |
| # Should-Stop: $network | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: aria2c init script. |
| <?php | |
| /* ----------------本探针基于YaHei.net探针------------------- */ | |
| error_reporting(0); //抑制所有错误信息 | |
| @header("content-Type: text/html; charset=utf-8"); //语言强制 | |
| ob_start(); | |
| $title = "雅黑PHP探针"; | |
| $version = "v0.4.2"; //版本号 | |
| define('HTTP_HOST', preg_replace('~^www\.~i', '', $_SERVER['HTTP_HOST'])); |
To remove a submodule you need to:
| <?php | |
| function fetchUrl( $url, $gzip = false ) { | |
| $raw = file_get_contents( $url, false, $context = stream_context_create( array( | |
| 'http' => array( | |
| 'method' => 'GET', | |
| 'header' => 'Accept-Encoding:' . ( $gzip ? 'gzip,deflate' : 'identity' ) . "\r\n", | |
| ) | |
| ) ) ); | |
| if ( $raw === false ) { |