Introduction
Nginx is a open source quite lightweight HTTP server which is written by Russian Igor Sysoev, the pronunciation is “engine X”. It’s a high performance HTTP and reverse proxy server, and also it is a IMAP/POP3/SMTP proxy server。
There are lots of website using Nginx in China, like Sina, Tencent, 163, Discuz and so on. The Nginx has a very high performance due to event driven way, and also it is a high performance reverse proxy, load balancing.
From last blog, maybe you already love the Cobalt2
theme, like me. We usually use the terminal to do something we need. So can changed the theme for our terminal?
The answer is yes, we can. Let me show you screenshots firstly.
There is a sublime text theme I want to introduce to you guys. It’s called Cobalt2
, it not only colour scheme for editor window, but also it includes all sublime theme(e.g. sidebar, search, tabs, etc…). You can get it from github cobalt2.
Editor
Keypress | Command |
---|---|
⌘ + X | Cut line |
⌘ + ↩ | Insert line after |
⌘ + ⇧ + ↩ | Insert line before |
⌘ + ⌃ + ↑ | Move line/selection up |
⌘ + ⌃ + ↓ | Move line/selection down |
⌘ + L | Select line - Repeat to select next lines |
⌘ + D | Select word - Repeat to select next occurrence |
⌃ + ⌘ + G | Select all occurrences of current selection |
⌃ + ⇧ + ↑ | Extra cursor on the line above |
⌃ + ⇧ + ↓ | Extra cursor on the line below |
⌃ + M | Jump to closing parentheses Repeat to jump to opening parentheses |
⌃ + ⇧ + M | Select all contents of the current parentheses |
⌃ + A | Move to beginning of line |
⌃ + E | Move to end of line |
⌘ + K, ⌘ + K | Delete from cursor to end of line |
⌘ + K + ⌫ | Delete from cursor to start of line |
⌘ + ] | Indent current line(s) |
⌘ + [ | Un-indent current line(s) |
⌘ + ⇧ + D | Duplicate line(s) |
⌘ + J | Join line below to the end of the current line |
⌘ + / | Comment/un-comment current line |
⌘ + ⌥ + / | Block comment current selection |
⌘ + Y | Redo, or repeat last keyboard shortcut command |
⌘ + ⇧ + V | Paste and indent correctly |
⌃ + Space | Select next auto-complete suggestion |
⌃ + U | Soft undo; jumps to your last change before undoing change when repeated |
⌃ + ⇧ + Up | Column selection up |
⌃ + ⇧ + Down | Column selection down |
⌃ + ⇧ + W | Wrap Selection in html tag |
⌃ + ⇧ + K | Delete current line of cursor |
Bracket
is open source web design text editor, it focus with visual tools and preprocesssor support. It is easy to design web page in the browser, we can get the page layout in time when we change the html, css, javascript. We don’t need to save the file and refresh the browser. That’s so convenience.
Sublime Text
is a sophisticated text editor for code, markup and prose. You can go to offical website to download and see how to use it. It’s a very powerful weapon for developer. And also it has so many packages to expand its functional.
If you want to install packages in your sublime text. First of all, you need to install Package Control
that is Sublime Text
package manager that makes it exceedingly simple to find, install and keep packages up-to-date.
Open Sublime Text 3 and choose View > Show Console
menu. Paste below codes into console.
1 | import urllib.request,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) |
Note: the original website address in here
Technical notes
The contents of files are not actually stored in the index (.git/index) or in commit objects. Rather, each file is stored in the object database (.git/objects) as a blob, identified by its SHA-1 hash. The index file lists the filenames along with the identifier of the associated blob, as well as some other data. For commits, there is an additional data type, a tree, also identified by its hash. Trees correspond to directories in the working directory, and contain a list of trees and blobs corresponding to each filename within that directory. Each commit stores the identifier of its top-level tree, which in turn contains all of the blobs and other trees associated with that commit.
Note: the original website address in here
Reset command
The reset command moves the current branch to another position, and optionally updates the stage and the working directory. It also is used to copy files from the history to the stage without touching the working directory.
If a commit is given with no filenames, the current branch is moved to that commit, and then the stage is updated to match this commit. If –hard is given, the working directory is also updated. If –soft is given, neither is updated.