Skip to content

Instantly share code, notes, and snippets.

View weaming's full-sized avatar
🦀
Rustacean

Garden Yuen weaming

🦀
Rustacean
  • Shenzhen, China
View GitHub Profile
@weaming
weaming / 修改网页背景色
Created December 17, 2015 11:23
Stylish修改网页背景色,让眼睛更舒服
body{background-color: #F6F4EC !important;}
/*
((?!github|docs\.python).)*
F6F4EC
*/
@weaming
weaming / solarized-dark-for-cnblogs.css
Last active December 21, 2015 01:23
solarized-dark.css For cnblogs.com
/*
solarized-dark css
Edited for cnblogs
*/
.cnblogs-markdown code{
color: #f92672 !important;
marigin-left: 2px !important;
marigin-right: 2px !important;
}
.cnblogs-markdown pre{color: #839496 !important;border: 0px !important;}
span.pre, code{
background: #002B36 !important;
color: #4E8B00 !important;
border: 0px !important;
margin: 0px;
}
code{
padding: 0px !important;
}

Adobe Reader

编辑--首选项--辅助工具--替换文档颜色--自定义颜色,然后将色调设为85,(饱和度)设为90,(亮度)设为205,对应为#CCE8CF

@weaming
weaming / sed.md
Last active January 6, 2016 06:49 — forked from zxhfighter/sed.md
sed简明教程

sed简明教程

FROM: 酷壳-陈皓

awk于1977年出生,今年36岁本命年,sed比awk大2-3岁,awk就像林妹妹,sed就是宝玉哥哥了。所以林妹妹跳了个Topless,他的哥哥sed坐不住了,也一定要出来抖一抖。

sed全名叫stream editor,流编辑器,用程序的方式来编辑文本,相当的hacker啊。sed基本上就是玩正则模式匹配,所以,玩sed的人,正则表达式一般都比较强。

同样,本篇文章不会说sed的全部东西,你可以参看sed的手册,我这里主要还是想和大家竞争一下那些从手机指缝间或马桶里流走的时间,用这些时间来学习一些东西。当然,接下来的还是要靠大家自己双手。

@weaming
weaming / php.ini
Created February 26, 2016 14:55
默认配置
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@weaming
weaming / php-fpm.ini
Created February 26, 2016 14:58
默认配置
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
@weaming
weaming / nginx.conf
Created February 26, 2016 15:14
默认配置
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
@weaming
weaming / useso-take-over-google.php
Created February 27, 2016 17:22
wordpress plugin source code
<?php
/*
Plugin Name: Useso take over Google
Plugin URI: http://www.brunoxu.com/useso-take-over-google.html
Description: 用360前端公共库Useso接管Google字体库和Google公共库,无需设置,插件安装激活后即刻生效。
Author: Bruno Xu
Author URI: http://www.brunoxu.com/
Version: 1.6.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
if ($("#toc").length == 0){
console.log('#toc not found.');
return 1;
}
$("h2,h3,h4,h5,h6").each(function(i,item){
var tag = $(item).get(0).localName;
$(item).attr("id","toc"+i);