start new:
tmux
start new with session name:
tmux new -s myname
### | |
# Returns a code that determine whether local branch and its origin's counterpart | |
# are in sync. In sync, in this case, means there's no commits in local branch | |
# that have not been pushed to the origin. In short, it means the following | |
# command returns nothing. | |
# | |
# git log {branch} --not origin/{branch} | |
# | |
# The code will be be in `$?` variable after the funciton call. | |
# The status code can be: |
### | |
# | |
# Echo string in color based on `--type`. | |
# Read `colorEcho()` funncton for more info on type. | |
# | |
# AUTHOR: | |
# | |
# Saophalkun Ponlu (phalkunz@gmail.com) | |
# | |
### |
/** | |
* A really simple template function. | |
* | |
* USAGE: | |
* | |
* 1. Ivoke `prepareTemplate(template)` by provide template string as an argument | |
* 2. The above invocation returns another function which called by with data argument | |
**/ | |
function prepareTemplate(template) { |
""" | |
" USAGE: | |
" | |
" 1. Place the cursor in the rule that you want to look up | |
" 2. :SCSSShowRulePath | |
""" | |
command! ScssShowRulePath :call ScssRulePath() | |
function! ScssRulePath() | |
let start_line_num = 0 |
/** | |
* Usage: | |
* | |
* Set custom (percentage or absolute) width on .video-outer-wrapper | |
* | |
* ``html | |
* <div class="video-outer-wrapper"> | |
* <div class="video-wrapper"> | |
* <iframe ... ></iframe> | |
* </div> |
(function(d, s) { | |
var js, fjs = d.getElementsByTagName(s)[0], load = function(url, id, callback) { | |
if (d.getElementById(id)) {return;} | |
js = d.createElement(s);js.src = url;js.id = id;js.async=true; | |
fjs.parentNode.insertBefore(js,fjs); | |
if(callback!=undefined) { | |
js.onload=callback; | |
//Extra for internet explorer | |
js.onreadystatechange = function () { if(this.readyState == 'complete' || this.readyState == 'loaded') { callback(); } } | |
} |
/** | |
* Returns a literal object with properties mapped to the query string variables | |
* For example: | |
* input (page url): http://www.test.com/index?one=1&two=2 | |
* value: { 'one': 1, 'two': 2 } | |
*/ | |
function urlVars() { | |
var search = window.location.search; | |
if(search === '' || !search || search === '?') { |
/** | |
* Profiling (running time). For dev purpose only. | |
*/ | |
(function() { | |
window._profiler = { | |
'profiles': [] | |
}; | |
_profiler.time = function(name) { | |
_profiler.profiles[name] = new Date(); | |
}; |
Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
In XCode's Preferences > Downloads you can install command line tools.