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
{ | |
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme", | |
"draw_indent_guides": true, | |
"draw_white_space": "all", | |
"fade_fold_buttons": false, | |
"font_face": "Source Code Pro", | |
"font_size": 12.0, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |
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
<!--form中的action需要增加你表单的提交地址,这样验证插件才能知道你的ajax往哪儿发: action="/record_email"--> | |
<form id="recordEmail" class="form-inline" method="post" enctype="multipart/form-data" accept-charset="utf-8" action="/record_email"> | |
<!--.......--> | |
</form> | |
<script> | |
$('#recordEmail').Validform({ | |
ajaxPost : true, //这里开启ajax提交 | |
tiptype : function(msg,o,cssctl){ | |
var objtip=o.obj.parents('#recordEmail').find(".Validform_checktip"); |
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
// ==UserScript== | |
// @name IKnowIKnow | |
// @namespace IKnowIKnow | |
// @include http://*.douban.com/* | |
// @version 1 | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js | |
// ==/UserScript== |
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
controllers.controller('TabBarController',function TabBarController ($scope,$log,$http) { | |
var tabBarItem =$('#tabBar > .item'); | |
var chatPanelOpen = false; | |
tabBarItem.click(function(){ | |
var tabClass = $(this).data('tab'); | |
if(!chatPanelOpen){ | |
$('#wrapper').addClass(tabClass); |
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
/* | |
# Usage in html template: | |
"xxx | nl2br" | |
<div ng-bind-html=" YourString | nl2br "></div> | |
or: |
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
/* | |
# Usage in html template: | |
"xxx | HTML2TXT" | |
<div ng-bind-html=" YourString | HTML2TXT "></div> | |
======= |
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
# auto convert xiami.com links to player | |
def xiami(value): | |
musics = re.findall('(http://www.xiami.com/song/[0-9]+)\s?', value) | |
if (len(musics) > 0): | |
for music in musics: | |
music_id = re.findall('http://www.xiami.com/song/([0-9]+)', music) | |
value = value.replace('http://www.xiami.com/song/' + music_id[0], | |
'<embed src="http://www.xiami.com/widget/15289_' + music_id[0] + '/singlePlayer.swf" type="application/x-shockwave-flash" width="257" height="33" wmode="transparent"></embed>') | |
return value | |
else: |
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
<link rel="stylesheet" href="/components/fancybox/source/jquery.fancybox.css"> | |
<script src="/components/fancybox/source/jquery.fancybox.js"></script> | |
<style> | |
#panel-weixin { | |
display: none; | |
text-align: center; | |
} | |
#panel-weixin .weixin-section { |
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
doctype html | |
//- if lt IE 7 | |
html.no-js.lt-ie9.lt-ie8.lt-ie7 | |
//- if IE 7 | |
html.no-js.lt-ie9.lt-ie8 | |
//- if IE 8 | |
html.no-js.lt-ie9 | |
//- [if gt IE 8] <! | |
html.no-js(lang="en") | |
//- <![endif] |