Tag: bash

~/.bashrc

export PS1='\[\e[0;34m\][\@]\[\e[m\] \[\e[0;36m\]\u@\h: \[\e[m\]\w $ '

alias chgrp='chgrp --preserve-root'
alias chmod='chmod --preserve-root'
alias chown='chown --preserve-root'

alias grep='grep --color=auto'

alias ll='ls -l'
alias ls='ls --color=auto'

alias h='history | grep'

# Show open ports
alias ports='netstat -tulanp'

# Lookup for process
alias psx='ps auxw | grep'

# History settings
export HISTFILESIZE=20000
export HISTSIZE=10000
shopt -s histappend

# Combine multiline commands into one in history
shopt -s cmdhist

# Ignore duplicates, and some commands
HISTCONTROL=ignoredups
export HISTIGNORE="&:ls:ll:cd:[bf]g:exit"
export HISTTIMEFORMAT='[%F %T] '

PATH=$PATH:~/bin
for d in ~/apps/*/bin; do PATH="$PATH:$d"; done
export PATH

export GREP_OPTIONS='-n -I --exclude-dir=.git --exclude-dir=.idea'
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

Spacers in Mac's Dock

Run in terminal

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

for single spacer (repeat command if need more).

Then restart Dock

killall Dock

New spacer appears at the end of Dock. Drag-n-drop it to desired location.

That's all!

Free programming books

Как следует из названия, куча-мала ссылок на бесплатные книги по программированию. Выбор огромен - от ассемблера до JavaScript, от книг по Windows GUI до Spring.

Судя по history, актуальность ссылок активно поддерживается.

Ссылка на GitHub: https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

compileonline.com

Compile and Execute your favorite programming languages online.

Programming languages: Ada (Gnat), Algol-68, Assembly, Awk, Bash Shell, Basic, Befunge, Brainf**k, C, C99 Strict, COBOL, C++, C++11, C++0x, C#, Clojure, Dart, D Language, Embedded C, Erlang, F#, Factor, Falcon, Fantom, Forth, Fortran-95, Go, Groovy, Haskell, ICON, Intercal, Java, LISP, Lua, Malbolge, MATLAB/Octave, Mozart-OZ, Nimrod, Node.js, Objective-C, OCaml, PARI/GP, Pascal, Pawn, Perl, PHP, Pike, Prolog, Python, Python-3, REXX, R Programming, Ruby, Rust, Scala, Scheme, Simula, Smalltalk, SQLite SQL, Tcl, Unix Shell, Unlambda, VB.Net, Verilog, Whitespace, LOLCODE, Julia, ScriptBasic, BaCon, ilasm, QuickBasic, SML/NJ.

http://compileonline.com

compileonline.com

Useful aliases and settings for .bashrc

alias chgrp='chgrp --preserve-root'
alias chmod='chmod --preserve-root'
alias chown='chown --preserve-root'

alias grep='grep --colour=auto'

alias ll='ls -l'
alias ls='ls --color=auto'

# Show open ports
alias ports='netstat -tulanp'

# Lookup for process
alias psx='ps auxw | grep '

# History settings
export HISTFILESIZE=20000
export HISTSIZE=10000
shopt -s histappend

# Combine multiline commands into one in history
shopt -s cmdhist

# Ignore duplicates, ls without options and builtin commands
HISTCONTROL=ignoredups
export HISTIGNORE="&:ls:ll:[bf]g:exit"