Git常用备忘.md
引自:http://blogread.cn/it/article/6282?f=sa
配置
git config --global user.name "robbin"
git config --global user.email "fankai@gmail.com"
git config --global color.ui true
| if (Meteor.is_client) { | |
| var userName = "PatelNachiket"; | |
| Template.hello.greeting = function () { | |
| return "Fetch recent tweets from Twitter stream of user : " ; | |
| }; | |
| Template.hello.events = { | |
| 'click #fetchButton' : function () { | |
| console.log("Recent tweets from stream!"); | |
| $('#fetchButton').attr('disabled','true').val('loading...'); |
Git常用备忘.md
引自:http://blogread.cn/it/article/6282?f=sa
配置
git config --global user.name "robbin"
git config --global user.email "fankai@gmail.com"
git config --global color.ui true
| # 变量 | |
| number = 2 | |
| str = '4' | |
| number = 1 if str | |
| # 变量 数组和objecet处理 | |
| [a, b, c] = [1, 2, 3] | |
| {key1, key2} = {key1: 'a', key2: 'b'} | |
| # 方法 |
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c and [c.
Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>jquery namespace test</title> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <div class="namespace1"> | |
| <div class="box">box1</div> |
| <?php | |
| $fileName = $_FILES['afile']['name']; | |
| $fileType = $_FILES['afile']['type']; | |
| $fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
| $dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
| $json = json_encode(array( | |
| 'name' => $fileName, | |
| 'type' => $fileType, | |
| 'dataUrl' => $dataUrl, |
| { | |
| // Sets the colors used within the text area | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| // Note that the font_face and font_size are overriden in the platform | |
| // specific settings file, for example, "Base File (Linux).sublime-settings". | |
| // Because of this, setting them here will have no effect: you must set them | |
| // in your User File Preferences. | |
| "font_face": "Monaco", | |
| "font_size": 12, |
翻译中...
A Pen by imjiangtao on CodePen.
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |