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 getNextSibling(ele) { | |
while (ele = ele.nextSibling) { | |
if (1 === ele.nodeType) return ele; | |
} | |
} |
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
import re | |
re.search(u'[\u4e00-\u9fa5]+', text.decode('utf-8')) |
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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
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
.wrap { background: #ccc; } | |
.logo { display: inline-block; background: green; } | |
.links { float: right; } |
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
.wrap { background: #ccc; } | |
.logo { display: inline-block; background: green; } | |
.links { float: right; } |
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 a = document.createElement('a'); | |
a.href = '/test/hello/world'; | |
alert(a.pathname) |
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
@-webkit-keyframes shaker { | |
0% { -webkit-transform: translate(1px, 0px) rotate(0deg); } | |
10% { -webkit-transform: translate(0px, -1px) rotate(-1deg); } | |
20% { -webkit-transform: translate(-2px, 0px) rotate(1deg); } | |
30% { -webkit-transform: translate(0px, 1px) rotate(0deg); } | |
40% { -webkit-transform: translate(0px, -0px) rotate(1deg); } | |
50% { -webkit-transform: translate(0px, 1px) rotate(-1deg); } | |
60% { -webkit-transform: translate(-2px, 0px) rotate(0deg); } | |
70% { -webkit-transform: translate(1px, 0px) rotate(-1deg); } | |
80% { -webkit-transform: translate(0px, 0px) rotate(1deg); } |
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
.rating { | |
unicode-bidi: bidi-override; | |
direction: rtl; | |
text-align: center; | |
} | |
.rating label { | |
display: inline-block; | |
width: 24px; |
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
myArray = []; // bad | |
myArray.length = 0; // good! |
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
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |
OlderNewer