This file contains 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
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |
This file contains 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
#Search meanings and sentences of words from qq dict | |
import httplib,urllib,json | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
def getJson(word): | |
url="http://dict.qq.com/dict?q="+word | |
url=url.encode('utf-8') | |
f=urllib.urlopen(url) |
This file contains 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
background-color:#313131; | |
background-image:url("../img/bg.jpeg"); | |
background-image: -webkit-linear-gradient(0deg, rgba(255,255,255,.03) 50%, transparent 50%), | |
-webkit-linear-gradient(0deg, rgba(255,255,255,.06) 50%, transparent 50%), | |
-webkit-linear-gradient(0deg, transparent 50%,rgba(255,255,255,.01) 50%), | |
url("../img/bg.jpeg"); | |
background-image: -moz-linear-gradient(0deg, rgba(255,255,255,.03) 50%, transparent 50%), | |
-moz-linear-gradient(0deg, rgba(255,255,255,.06) 50%, transparent 50%), | |
-moz-linear-gradient(0deg, transparent 50%,rgba(255,255,255,.01) 50%), | |
url("../img/bg.jpeg"); |
This file contains 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
(function(){ | |
//if autoStart is false,press key(ctrl+shift+a) to remember position | |
//if autoStart is true,remember position when page is scrolled(how?) | |
var autoStart=false; | |
var xposition=window.pageXOffset; | |
var yposition=window.pageYOffset; | |
//press shortcut key to remember | |
if(!autoStart){ | |
document.addEventListener("keydown",function(){ | |
if((event.ctrlKey)&&(event.altKey)&&(event.keyCode==82)){ |
This file contains 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
String.prototype.reverse=function(){ | |
var that=this;//or this points to window | |
function rev(len,result){ | |
if(len==0) | |
return result; | |
else{ | |
//console.log(this); | |
return rev(len-1,result+that[len-1]); | |
} | |
} |
This file contains 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
/* define color from inside to outside */ | |
bg-color = white | |
border-color = grey | |
shadow-color = #ccc | |
.tips | |
/* layout */ | |
z-index: 0 | |
position: absolute | |
/* presentation */ |
This file contains 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
.dialog { | |
/* layout */ | |
position: absolute; | |
top: 38.20%; | |
left: 50%; | |
-webkit-transform: translate(-50%, -50%); | |
-moz-transform: translate(-50%, -50%); | |
transform: translate(-50%, -50%); | |
/* presentation */ | |
border: 0.5em solid rgba(0,0,0,0.16); |
This file contains 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
var offsets = []; | |
var curPos = 0; | |
$('#list li').each(function(i){ | |
// init : original order | |
$(this).attr('data-order',i); | |
$(this).bind('dragstart',function(event){ | |
return $( this ).css({'opacity':.5,'color':'white','border':'1px dashed #ccc'}) | |
.clone().addClass('active') | |
.insertAfter( this ); |
This file contains 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
$.unparam = function(search) { | |
var queries = search.split('&') | |
var retObj = {} | |
$(queries).each(function(index, query) { | |
var match = query.match(/([^?&]*)=([^&]*)/i) | |
if(match) { | |
retObj[match[1]] = match[2] | |
} | |
}) | |
return retObj |
This file contains 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
.wrapper { | |
background: url('http://daix.me/demo/img/reese.jpg') no-repeat fixed; | |
width: 900px; | |
height: 600px; | |
} | |
.lens { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
top: 10%; |
OlderNewer