⌘T | 切換檔案 |
⌘⌃P | 切換專案 |
⌘R | 畫面切換到 method |
⌃G | 畫面切換到指定行數 |
⌘KB | 關閉 / 開啟側邊欄 |
⌘⇧P | 開啟指令控制面板 |
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
str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); |
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 url = /^(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2}))|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?$/i | |
, chinese = /[\u4e00-\u9fa5]+/ | |
, cText = '中文https://github.com/夾雜網址。' | |
, eText = 'english https://github.com/ url.' | |
, mixText = '中 en 文https://github.com/夾雜 google.com網址' | |
, gResult; | |
// utilities |
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
+----------------------------+----------------------+-------------+----------------+----------------+ | |
| | | | | | | |
| Helper | GET | POST | PUT | DELETE | | |
| | | | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+ | |
| | | | | | | |
| blog_post_path(@post) | /blog/posts/12 | | /blog/posts/12 | /blog/posts/12 | | |
| | | | | | | |
+----------------------------+----------------------+-------------+----------------+----------------+ | |
| | | | | | |
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
<div class="jumbotron"> | |
<div class="jumbotron-header"> | |
<h1>這是標題</h1> | |
</div> | |
<div class="jumbotron-body"> | |
<p>這裡是內文,上面要有一條線</p> | |
</div> | |
<div class="jumbotron-footer"> | |
<p>這裡是 footer,上面不能有線</p> | |
</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
// | |
// | |
// | |
// .__ __. ______ _______ _______ __ _______. | |
// | \ | | / __ \ | \ | ____| | | / | | |
// | \| | | | | | | .--. || |__ | | | (----` | |
// | . ` | | | | | | | | || __| .--. | | \ \ | |
// oooooooooooo | |\ | | `--' | | '--' || |____ __| `--' | .----) | | |
// `888' `8 |__| \__| \______/ |_______/ |_______(__)\______/ |_______/ | |
// 888 oooo ooo oo.ooooo. oooo d8b .ooooo. .oooo.o .oooo.o |
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
<?php | |
$url = 'http://vimeo.com/71673549'; | |
preg_match('/\/\/(www\.)?vimeo.com\/(\d+)($|\/)/', $url, $matches); | |
?> | |
<iframe src="http://player.vimeo.com/video/<?php echo $matches[2] ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func rootHandler(w http.ResponseWriter, r *http.Request) { |
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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
zh-TW: | |
errors: | |
messages: | |
expired: "已經過期,請重新申請一個" | |
not_found: "找不到" | |
already_confirmed: "已經驗證,請直接登入" | |
not_locked: "被鎖定了" | |
not_saved: |
OlderNewer