Monday, June 13, 2016

Friday, June 10, 2016

Install Sublime Text 3

Download Sublime Text 3:
wget https://download.sublimetext.com/sublime_text_3_build_3114_x64.tar.bz2
Uncompress tarball:
sudo tar vxjf sublime_text_3_build_3114_x64.tar.bz2
Move sublime directory to /opt:
sudo mv sublime_text_3 /opt/
Create symbolic link to sublime:
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime
Execute sublime and enjoy!:
sublime

Thursday, June 9, 2016

Git - Steps to commit a project

1. Show the status(how many new files, deleted files, modified files, etc.):
$ git status
2. Add all files to the project:
$ git add -A
the -A option means track all including deleted files.

3. Commit:
$ git commit -m "[Comments]"
the -m option gives you the possibility to add your comments in the same line.

4. Push:
$ git push -u origin master
The -u is optional and what it does is sets your local repo to a central one in order to, in the next time, git knows where to push and pull from.

For basic snapshotting see:
http://gitref.org/basic/

Thursday, May 19, 2016

Copy command output data to standard output and to a file

Use the tee command: 
 
$ [COMMAND] | tee [OUTPUT.FILE]
 
Where:
 
[COMMAND] is the command you want to execute.
[OUTPUT.FILE] is the file you want to write in.
 
 
Variation for writing the standard error output:
 
$ [COMMAND] 2>&1 | tee [OUTPUT.FILE]
 
Where:
 
[COMMAND] is the command you want to execute. 
[OUTPUT.FILE] is the file you want to write in.
2>&1 redirects stderr(2) to stdout(1).
 
Notes:
2>&1 is different that 2>1.
2>1 means writing to a file with name 1 and 2>&1 means write to the standard output.

Monday, May 9, 2016

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Search This Blog

Powered by Blogger.