Skip to content

Instantly share code, notes, and snippets.

View Gaubee's full-sized avatar
🫐
Growing

Gaubee Gaubee

🫐
Growing
View GitHub Profile
@Gaubee
Gaubee / demo.html
Last active March 1, 2018 03:00
开源的javascript实现页面打印功能,兼容所有主流浏览器(Chorme,Firefox,IE10,9,8,7,Opera,360安全(急速和兼容模式))
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>javascript实现页面打印(适合B/S)程序</title>
<script src="js/jquery-1.6.4.min.js"></script>
<script src="js/jquery.printPage.js"></script>
<script type="text/javascript">
$(document).ready(function ()
{
@Gaubee
Gaubee / jquery.printPage.js
Created December 5, 2013 05:46
开源的javascript实现页面打印功能,兼容所有主流浏览器(Chorme,Firefox,IE10,9,8,7,Opera,360安全(急速和兼容模式))
/**
* jQuery printPage Plugin
* @version: 1.0
* @author: Cedric Dugas, http://www.position-absolute.com
* @licence: MIT
* @desciption: jQuery page print plugin help you print your page in a better way
*/
(function($) {
$.fn.printPage = function(options) {
@Gaubee
Gaubee / head-mate.html
Last active December 26, 2015 16:18
网页头部
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>标题</title>
<meta name="description" content="描述">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FUCK 360 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">
@Gaubee
Gaubee / Emmet操作快捷键
Created October 25, 2013 13:06
前端开发Lab » Emmet使用教程
展开缩写 – Tab or Ctrl+E
互动式展开缩写 — Ctrl+Alt+Enter
标签对匹配外 – Ctrl+,
标签对匹配内 – Shift+Ctrl+0
对匹配– Ctrl+Alt+J
使用缩写包裹 — Shift+Ctrl+G
转到编辑点 — Ctrl+Alt+→ or Ctrl+Alt+←
选择项目– Shift+Ctrl+. or Shift+Ctrl+,
切换注释— Shift+Ctrl+/
拆分/加入标签 — Shift+Ctrl+`
@Gaubee
Gaubee / With.js
Created October 21, 2013 14:09
使用Object.prototype的原型链绑定方式来实现with。 如果使用全局对象global或者window会导致原对象无法访问。 但是使用这种方法会导致作用域等级下降,同名变量无法正确访问。 比如说window中有一个name变量,则下面测试例子中的name无法正确访问。
(function(G) {
"use strict"
var G = Object.prototype;
G.With = function(withObj, withFun) {
var keys = [],
backup_Obj_pro = {},
i,
len,
key;
for (i in withObj) {
.pull-quote {
background: -webkit-linear-gradient(top,green 0,red 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@Gaubee
Gaubee / Default (Windows).sublime-keymap
Created October 19, 2013 11:41
选中的数字值累加1
[
{ "keys": ["shift+f1"], "command": "increment_selection" }
]
@Gaubee
Gaubee / fuck-baidu-music.js
Created October 18, 2013 04:24
百度音乐去除广告,并成为VIP的Tampermonkey插件脚本
// ==UserScript==
// @name Ad Screening Program in Baidu music 百度音乐广告屏蔽程序
// @namespace http://github.com/gaubee/blog
// @version 0.1
// @run-at document-start
// @description 用于屏蔽百度音乐中的难听的广告声音,还有相关的广告画面
// @match http://play.baidu.com/
// @copyright 2013+, You
// ==/UserScript==
;(function(){
@Gaubee
Gaubee / rAF.js
Last active December 25, 2015 14:29 — forked from paulirish/rAF.js
// MIT license
(function() {
"use strict"
var G = window,
lastTime = 0,
vendors = ['ms', 'moz', 'webkit', 'o'],
_KEY_AnimationFrame = 'AnimationFrame',
_KEY_equest = 'equest',
_KEY_ancel = 'ancel',
_KEY_requestAnimationFrame = 'r' + _KEY_equest + _KEY_AnimationFrame,