Skip to content

Instantly share code, notes, and snippets.

View viko16's full-sized avatar
🎯
Focusing

viko16 viko16

🎯
Focusing
View GitHub Profile
@viko16
viko16 / lt-ie8.html
Last active August 29, 2015 14:23
屏蔽 IE6 7 #html
<!--[if lt IE 8]>
<style type="text/css">html{overflow:hidden}body{height:100%;overflow:auto}#upgradeyoubrowser{position:fixed;height:100%;width:100%;top:0;left:0;bottom:0;right:0;z-index:9999;background:#fff;padding:30px}#upgradeyoubrowser h3{padding:30px}#upgradeyoubrowser a{color:#08c;text-decoration:underline}</style>
<div id="upgradeyoubrowser">
<h1>是时候升级你的浏览器了</h1>
<h2>你正在使用过期的 Internet Explorer,请升级或更换后再访问。</h2>
<h3>建议你下载安装,以便更好地访问我们的网站 : )</h3>
<ul>
<li><a href="http://windows.microsoft.com/zh-cn/windows/upgrade-your-browser" target="_blank">Microsoft Internet Explorer 9</a></li>
@viko16
viko16 / pointgames-auto.js
Last active May 4, 2018 01:59
招行信用卡打坦克小游戏刷分 #javascript
// 坤坤写的自动版
if (!Object.prototype.watch) {
Object.defineProperty(Object.prototype, "watch", {
enumerable: false,
configurable: true,
writable: false,
value: function (prop, handler) {
var oldval = this[prop],
newval = oldval,
@viko16
viko16 / export.py
Created November 24, 2015 15:54
从 Typecho 导出 Markdown #python
# encoding=utf8
import MySQLdb
import sys
import time
reload(sys)
sys.setdefaultencoding('utf8')
specialSign = "<!--markdown-->"
@viko16
viko16 / css3.css
Last active February 9, 2016 17:14
解决 Chrome 下 CSS keyframe animation 导致 CPU 过高的问题 #css
.el {
transform: transition3d(0,0,0);
transform: translateZ(0); /* 推荐 */
}
/*
* 二选一即可
* 强制开启GPU硬件加速
* 参考:
* @url http://stackoverflow.com/questions/13176746/css-keyframe-animation-cpu-usage-is-high-should-it-be-this-way
@viko16
viko16 / config.cson
Created February 24, 2016 06:03
Atom 自己的配置
"*":
"atom-beautify":
_analyticsUserId: "c4bbb6d5-8b8e-42b0-ae10-07a10722a74b"
analytics: false
"atom-csscomb":
indentSize: 4
"atom-material-ui":
fonts:
fontSize: 14
tabs: {}
@viko16
viko16 / Preferences.sublime-settings
Last active February 10, 2017 06:42
Sublime Text 3 自己的配置
{
// "color_scheme": "Packages/ayu/ayu-dark.tmTheme",
"create_window_at_startup": false,
"font_face": "Ubuntu mono",
"font_size": 14,
"ignored_packages":
[
"Git",
"GitGutter",
"Vintage"
@viko16
viko16 / grid-float.styl
Created March 2, 2016 08:46
百分比网格布局 #stylus
// Grid
.row
margin-bottom: 2%
&:after
clear: both
&:before, &:after
content: " "
display: table
[class*=col-]
@viko16
viko16 / commit-message.md
Last active June 27, 2016 09:41
Commit message 的格式

Header

Header 部分只有一行,包括三个字段:

type(必需)、scope(可选)和subject(必需)。

type

用于说明 commit 的类别,只允许使用下面7个标识。

  • feat:新功能
@viko16
viko16 / font.md
Last active August 14, 2016 11:16
挑选字体

Inconsolata

  • Good: 一切都好,非常好看的等宽,第一眼很惊艳
  • Bad: 斜体不太好看,引号太斜几乎不能忍

Monaco

  • Good: 中规中矩,斜体好看
  • Bad: 总感觉是被拉高了,感觉怪怪的,暂时发现小写 m 挤在一起不太好看

Source Code Pro

  • Good: 字体饱满,i l 特别,0 中间带点
@viko16
viko16 / screen-capture.js
Created July 18, 2016 17:33
用 PhantomJS 网页截图
var page = require('webpage').create();
var url = 'http://ukn.me/#!/post/2016-07-13-Array%2520%25E9%259B%2586%25E5%2590%2588%25E6%2596%25B9%25E6%25B3%2595.md';
// 视窗大小
page.viewportSize = {
width: 1440,
height: 900
}