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 / 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;}
@weaming
weaming / 修改网页背景色
Created December 17, 2015 11:23
Stylish修改网页背景色,让眼睛更舒服
body{background-color: #F6F4EC !important;}
/*
((?!github|docs\.python).)*
F6F4EC
*/
@weaming
weaming / python-logging.py
Last active July 12, 2016 04:32
python 的 logging 模块
# coding:utf-8
"""
CRITICAL = 50
FATAL = CRITICAL
ERROR = 40
WARNING = 30
WARN = WARNING
INFO = 20
DEBUG = 10
NOTSET = 0
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的手册,我这里主要还是想和大家竞争一下那些从手机指缝间或马桶里流走的时间,用这些时间来学习一些东西。当然,接下来的还是要靠大家自己双手。

function checkBrowser(){
var br={}
var ua=navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/chrome\/([\d.]+)/)) ? br.chrome = s[1] :
(s = ua.match(/firefox\/([\d.]+)/)) ? br.firefox = s[1] :
(s = ua.match(/msie ([\d.]+)/)) ? br.ie = s[1] :
(s = ua.match(/net.*rv:([\d.]+)/)) ? br.ie = s[1] :
(s = ua.match(/opera.([\d.]+)/)) ? br.opera = s[1] :
(s = ua.match(/version\/([\d.]+).*safari/)) ? br.safari = s[1] : 0;
@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