Merge remote-tracking branch 'upstream/master'

This commit is contained in:
John Shanahan 2013-09-03 23:53:31 -04:00
commit 68de9655e5
6 changed files with 125 additions and 4 deletions

5
cheatsheets/aptitude Normal file
View File

@ -0,0 +1,5 @@
# To search for packages:
aptitude search "whatever"
# To display package records for the named package(s):
aptitude show pkg(s)

View File

@ -2,6 +2,9 @@
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
# To set your editor:
git config --global core.editor emacs
# To enable color:
git config --global color.ui true

43
cheatsheets/pacman Normal file
View File

@ -0,0 +1,43 @@
# All the following command work as well with multiple package names
# To search for a package
pacman -Ss <package name>
# To update the local package base and upgrade all out of date packages
pacman -Suy
# To install a package
pacman -S <package name>
# To uninstall a package
pacman -R <package name>
# To uninstall a package and his depedencies, removing all new orphans
pacman -Rcs <package name>
# To get informations about a package
pacman -Si <package name>
# To install a package from builded package file (.tar.xz)
pacman -U <file name/file url>
# To list the commands provided by an installed package
pacman -Ql <package name> | sed -n -e 's/.*\/bin\///p' | tail -n +2
# To list explicitly installed packages
pacman -Qe
# To list orphan packages (installed as dependencies and not required anymore)
pacman -Qdt
# You can't directly install packages from the Arch User Database (AUR) with pacman.
# You need yaourt to perform that. But considering yaourt itself is in the AUR, here is how to
build a package from its tarball.
# First, get the .tar.gz archive and unpack it
wget <archive url>
tar -xzf <archive file>
cd <unpacked folder>
# Then build the package and install it
makepkg -s
pacman -U <package file (.pkg.tar.xz)>

41
cheatsheets/tmux Normal file
View File

@ -0,0 +1,41 @@
# Start tmux:
tmux
# Detach from tmux:
Ctrl-b d
# Restore tmux session:
tmux attach
# Display session:
tmux ls
# Start a shared session:
tmux -S /tmp/your_shared_session
chmod 777 /tmp/your_shared_session
# Help screen (Q to quit):
Ctrl-b ?
# Scroll in window:
Ctrl-b PageUp/PageDown
# Window management
# =================
# Create window:
Ctrl-b c
# Destroy window:
Ctrl-b x
# Switch between windows:
Ctrl-b [0-9]
or
Ctrl-b Arrows
# Split windows horizontally:
Ctrl-b %
# Split windows vertically:
Ctrl-b "

View File

@ -1,8 +1,14 @@
# Appending
a - drops vim into append mode
i - enters append mode without character skip
# Insertion
a - enters insertion mode, append after the cursor.
A - enters insertion mode, at the end of the line.
i - enters insertion mode, insert before the cursor.
I - enters insertion mode, at the beginning of the line.
o - enters insertion mode, creating a new line under the cursor.
O - enters insertion mode, creating a mew line above the cursor.
C - enters insertion mode, cut the end of the line.
# File management
:w - writes (saves) file
:x - writes (saves) file ans exit
:q - quits
;q! - quits without saving changes
:q! - quits without saving changes

23
cheatsheets/yaourt Normal file
View File

@ -0,0 +1,23 @@
# All pacman commands are working the same way with yaourt.
# Just check the pacman cheatsheet.
# For instance, to install a package :
pacman -S <package name>
yaourt -S <package name>
# The difference is that yaourt will also query the Arch User Repository,
# and if appropriate, donwload the source and build the package requested.
# Here are the commands yaourt provides while pacman doesn't :
# To search for a package and install it
yaourt <package name>
# To update the local package base and upgrade all out of date package, including the ones from
AUR and the packages based on development repos (git, svn, hg...)
yaourt -Suya --devel
# For all of the above commands, if you want yaourt to stop asking constantly for confirmations,
use the option --noconfirm
# To build a package from source
yaourt -Sb <package name>