- List only dirs
ls -ld */.
- List only files
ls -p | grep -v /
| # If you are using Ubuntu 32 bit just go straight you don't have to install ia32-libs | |
| # and if you have any troubles with dependencies. I suggest you change your Ubuntu update server to the main server. | |
| sudo apt-get install ia32-libs | |
| # Download the newest version of Kingsoft office here: http://wps-community.org/download.html | |
| # There are deb, rpm and source code too | |
| wget http://wdl.cache.ijinshan.com/wps/download/Linux/unstable/kingsoft-office_9.1.0.4184~a12p1_i386.deb | |
| # Install using dpkg | |
| sudo dpkg -i kingsoft* |
| #!/bin/bash | |
| # The default version of VBox in Ubuntu partner repo is 4.1 | |
| # We need to add new repo to install newest version 4.2.x | |
| # Add virtualbox repo | |
| sudo apt-add-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" -y | |
| # Add Oracle public key | |
| wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - |
| #!/bin/bash | |
| # | |
| # Installs stardict in Ubuntu 12.04 and enables its systray icon | |
| echo " | |
| This script will add 'ppa:ubuntu-vn/ppa' repo to your update list | |
| then install 'stardict' and 'english<->vietnamese' 'japanese<->vietnamese' dicts | |
| " | |
| sleep 1.5 |
| #!/bin/bash | |
| # | |
| # This script will install RVM then use it to install RUBY, RAILS. | |
| # Thanks for DigitalOcean awesome guides at: | |
| # https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-centos-6-with-rvm | |
| # https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm | |
| # Detect which distro | |
| DISTRO=`cat /etc/issue` |
| #!/bin/bash | |
| # | |
| # Enable syntax highlight mode in LESS command by using source-highlight | |
| # http://www.gnu.org/software/src-highlite/ | |
| sudo apt-get install source-highlight -y | |
| cat >> ~/.bashrc <<EOF | |
| export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" | |
| export LESS=" -R" |
| #!/bin/bash | |
| # | |
| # Install SSHFS to mount remote folder to local folder -> edit code with Sublime for example | |
| # Install sshfs | |
| sudo apt-get install sshfs -y | |
| sudo modprobe fuse | |
| # Get your username | |
| YOUR_USER_NAME=$(whoami) |
| # Aliases | |
| # Copy this file to ~/.bash_aliases | |
| alias update='sudo apt-get update' | |
| alias upgrade='sudo apt-get upgrade -y' | |
| alias up='sudo apt-get update && sudo apt-get upgrade -y' | |
| alias dist-upgrade='sudo apt-get dist-upgrade -y' | |
| alias inst='sudo apt-get install' | |
| alias ins='sudo apt-get install --no-install-recommends' | |
| alias remove='sudo apt-get remove --purge' |
| #!/usr/bin/env bash | |
| # | |
| # Stop pop-up adware in MAC OS | |
| # https://support.apple.com/en-us/HT203987 | |
| # http://www.thesafemac.com/arg-identification/ | |
| # Allow to loop through path with spaces | |
| # http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html | |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") |
ls -ld */.
ls -p | grep -v /
| #!/bin/bash | |
| # | |
| # Highligh Nginx config file in Vim | |
| # Download syntax highlight | |
| mkdir -p ~/.vim/syntax/ | |
| wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim | |
| # Set location of Nginx config file | |
| cat > ~/.vim/filetype.vim <<EOF |