This file contains hidden or 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 getMaxSub(s1, s2) { | |
var max = 0, retchars = []; | |
for(var index = 0; index < s1.length; index++){ | |
var count = 0, chars = []; // 每次遍历都置空 | |
debug('============%d============', index); | |
for(var i = index, j = 0; j < s2.length; j++){ | |
var s1char = s1[i]; | |
var s2char = s2[j]; | |
debug(s1char, s2char, s1char === s2char); | |
if(s1char === s2char){ |
This file contains hidden or 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
body, | |
.dict_title, | |
.iCiBa_open_suggest, | |
.iCiBa_open_suggest_input { font-family:Adelle!important; } | |
#icibaSugContent li { padding-left:10px!important; } | |
#main_box { width:824px!important;} | |
#dict_main, .dictbar { width:824px!important; } | |
#dict_main { width:inherit!important; } | |
#side_bar { display:none!important; } /*右侧推荐*/ |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
$all = 'abba | |
acdc | |
ace | |
acorn | |
add | |
adele | |
africa |
This file contains hidden or 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
--在Automator新建Service,Utilities选Run AppleScript,粘帖以下代码,保存命名为evernote-diarynew | |
--在System Prefrences > Keyboard > Application Shortcut,点+号新增 | |
--Application选Evernote, Menu Title写evernote-diarynew, Keyboard Shortcut自选,推荐Command+D | |
on run {input, parameters} | |
set yearStr to do shell script "date +%Y" | |
set dateStr to do shell script "date +%Y-%m-%d" | |
set diaryNotebook to "[日志-" & yearStr & "]" | |
set searchQuery to ("notebook:" & diaryNotebook & " intitle:" & dateStr) as string | |
set searchQueryCollection to ("notebook:" & diaryNotebook) as string |
This file contains hidden or 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
PS1="[\u@\h:\W\[\033[0;32m\]\$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')\033[0m]\$ " |