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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
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
| # /etc/nginx/sites-available/blog.shellexy.info | |
| server { | |
| resolver 8.8.8.8; | |
| listen 80; | |
| server_name blog.shellexy.info; | |
| #access_log off; | |
| access_log /var/log/nginx/blog.shellexy.info.access.log; | |
| location / { | |
| #避免远方启用压缩导致无法替换纯文本 | |
| proxy_set_header Accept-Encoding ""; |
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
| Python Cheatsheet | |
| ================= | |
| ################################ Input & Output ############################### | |
| name = input('please enter your name: ') | |
| print('hello,', name) | |
| ageStr = input('please enter your age: ') | |
| age = int(ageStr) |
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
| /** | |
| * - chrome为了安全考虑,设计的不支持js操作加入收藏夹, | |
| * - 火狐23之后开始废止window.sidebar因为不是w3c标注 https://bugzilla.mozilla.org/show_bug.cgi?id=691647 | |
| * - document.all 判断IE不够靠谱,因为现在许多浏览器也实现了document.all吗,并且IE11以后(document.all)为falsy | |
| * - 参考 http://stackoverflow.com/questions/10033215/add-to-favorites-button | |
| * - IE 中typeof window.external.addFavorite 为'unknown' [http://www.xdarui.com/archives/203.html]; | |
| */ | |
| var url = 'https://gist.github.com/', | |
| title = 'gist代码片段'; |
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
| /** | |
| * animated rainbow border | |
| * works as it should in Firefox & Safari | |
| * ugly in Chrome, rotation not compensated in Opera | |
| */ | |
| h1 { | |
| width: 6.5em; height: 6.5em; | |
| padding: .2em; | |
| border-radius: 50%; | |
| margin: 6.3em auto; |
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
| // Sample pdnsd configuration file. Must be customized to obtain a working pdnsd setup! | |
| // Read the pdnsd.conf(5) manpage for an explanation of the options. | |
| // Add or remove '#' in front of options you want to disable or enable, respectively. | |
| // Remove '/*' and '*/' to enable complete sections. | |
| global { | |
| perm_cache=999999; | |
| cache_dir="/usr/local/var/cache/pdnsd"; | |
| # pid_file = /var/run/pdnsd.pid; | |
| run_as="nobody"; |
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
| #!/usr/bin/env python | |
| #coding=utf-8 | |
| # modifyDate: 20120808 ~ 20120810 | |
| # 原作者为:bones7456, http://li2z.cn/ | |
| # 修改者为:decli@qq.com | |
| # v1.2,changeLog: | |
| # +: 文件日期/时间/颜色显示、多线程支持、主页跳转 | |
| # -: 解决不同浏览器下上传文件名乱码问题:仅IE,其它浏览器暂时没处理。 | |
| # -: 一些路径显示的bug,主要是 cgi.escape() 转义问题 | |
| # ?: notepad++ 下直接编译的server路径问题 |
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
| # !/usr/bin/env python | |
| # coding=utf-8 | |
| # http://my.oschina.net/leejun2005/blog/71444 | |
| """ | |
| 简介:这是一个 python 写的轻量级的文件共享服务器(基于内置的SimpleHTTPServer模块), | |
| 支持文件上传下载,只要你安装了python(建议版本2.6~2.7,不支持3.x), | |
| 然后去到想要共享的目录下,执行: | |
| python SimpleHTTPServerWithUpload.py | |
| 或者 python SimpleHTTPServerWithUpload.py filename |
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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
OlderNewer