Skip to content

Instantly share code, notes, and snippets.

.stack { position: fixed; bottom: 28px; right: 40px; }
.stack > img { position: relative; cursor: pointer; padding-top: 35px; z-index: 2; }
.stack ul { list-style: none; position: absolute; top: 5px; cursor: pointer; z-index: 1; }
.stack ul li { position: absolute; }
.stack ul li img { border: 0; }
.stack ul li span { display: none; }
.stack .openStack li span {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
display:block;
height: 14px;
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="jquery.backstretch.min.js"></script>
<script>
// To attach Backstrech as the body's background
$.backstretch("path/to/image.jpg");
// You may also attach Backstretch to a block-level element
$(".foo").backstretch("path/to/image.jpg");
@sivagao
sivagao / css3animation.js
Created July 18, 2013 21:42
use css3 animation|transition, instead of jQuery native time slice animation.
//= require modernizr
// Helper for performing css3 or jquery animations
;(function( window, $, undefined ){
'use strict';
$.fn.css3animate = function (rules, duration, easing, callback) {
var $this = $(this);
if (Modernizr.csstransitions) {
[
{"keys": ["ctrl+alt+b"], "command": "open_browser"},
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{"keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"}
]
{
"color_scheme": "Packages/Theme - Flatland/Flatland.tmTheme",
"default_line_ending": "unix",
"font_size": 9,
"highlight_line": true,
"ignored_packages":
[
"ASP",
"SublimeCodeIntel",
"Nodejs",
@sivagao
sivagao / wandoujiaWeiboCRM.js
Created June 15, 2013 09:40
wandoujia weibo2zendesk CRM
var isWaitingAuth = true;
var isScheduleWorking = false;
var processPostTime;
var processCommentByMeTime;
var processCommentToMeTime;
// 收集从什么时间开始信息
// 基于已处理的postid和ticketid
@sivagao
sivagao / onlogin_discuz.php
Created June 15, 2013 02:10
onlogin_discuz.php
global $_G;
// not working, always been none
// $from_connect = $this->setting['connect']['allow'] && !empty($_GET['from']) ? 1 : 0;
// $seccodecheck = $from_connect ? false : $this->setting['seccodestatus'] & 2;
// $seccodestatus = !empty($_GET['lssubmit']) ? false : $seccodecheck;
// $invite = getinvite();
$_G['uid'] = $_G['member']['uid'] = 0;
$_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
@sivagao
sivagao / JS-TEST-using js snippet to build html.html
Created May 30, 2013 10:18
JS-TEST-using js snippet to build html.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>jQuery Transit tests</title>
<script>
(function() {
var m = location.search.match(/jquery=([^&$]*)/);
var jQueryVersion = m ? m[1] : "1.8.1";
@sivagao
sivagao / JS:doubanEnhance.js
Created May 22, 2013 16:57
JS:doubanEnhance.js - 增强网站的插件典范!!!
// ==UserScript==
// @name 豆藤 Bean vine
// @namespace http://userscripts.org/scripts/show/49911
// @description 为豆瓣(www.douban.com)添加各种人性化的功能。
// @require http://autoupdate.sinaapp.com/autoupdatehelper.js
// @include http*
// @version 2012.12.19
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_addStyle