#Linux Cheat Sheet
##File Commands:
- ls – directory listing
- ls -al – formatted listing with hidden files
- cd dir - change directory to dir
- cd – change to home
- pwd – show current directory
- mkdir dir – create a directory dir
- rm file – delete file
| h1. Sublime Text 2 - Useful Shortcuts (PC) | |
| Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/. | |
| h2. Editing | |
| | *Ctrl+C* | copy current line (if no selection) | | |
| | *Ctrl+X* | cut current line (if no selection) | | |
| | *Ctrl+⇧+K*| delete line | | |
| | *Ctrl+↩* | insert line after | |
| ############################################## | |
| # /etc/lusca/squid.conf | |
| # Taken from http://goo.gl/jOUXQ | |
| ############################################## | |
| #============================================= | |
| # Port and Transparent | |
| #============================================= | |
| http_port 3128 transparent | |
| server_http11 on | |
| icp_port 0 |
| #!/bin/bash | |
| cd /tmp | |
| wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz | |
| tar xvzf ruby-1.9.2-p290.tar.gz | |
| cd ruby-1.9.2-p290 | |
| ./configure --prefix=/usr\ | |
| --program-suffix=1.9.2\ | |
| --with-ruby-version=1.9.2\ | |
| --disable-install-doc | |
| make |
| /ip firewall address-list | |
| add list=nice address="120.160.0.0/11" | |
| add list=nice address="182.0.0.0/12" | |
| add list=nice address="114.120.0.0/13" | |
| add list=nice address="182.24.0.0/14" | |
| add list=nice address="114.56.0.0/14" | |
| add list=nice address="182.28.0.0/15" | |
| add list=nice address="118.137.0.0/16" | |
| add list=nice address="118.136.0.0/16" | |
| add list=nice address="111.95.0.0/16" |
| #!/bin/bash | |
| # @des: Download Ubuntu ISO DVD Repository | |
| # @author: Aris S. Ripandi <riespandi@gmail.com> | |
| # @usage: chmod +x getubrepo && ./getubrepo 32 | |
| # ---------------------------------------------------------------------- | |
| _bit="${1:-64}" | |
| _arch="i386" | |
| _version="12.04" | |
| _base="http://kambing.ui.ac.id/iso/ubuntu-repository/${_version}" | |
| [ "$_bit" == "64" ] && { _arch="amd64"; } |
| application: APP_ID | |
| version: 1 | |
| api_version: 1 | |
| runtime: python | |
| default_expiration: "1d" | |
| handlers: | |
| - url: /(.*\.(appcache|manifest)) | |
| mime_type: text/cache-manifest | |
| static_files: \1 |
#Linux Cheat Sheet
##File Commands:
| #!/bin/bash | |
| # | |
| # http://wiki.i-mscp.net/doku.php?id=start:howto:replace_squirrelmail_with_roundcube | |
| # | |
| # | |
| echo 'siliwangi.kits.or.id' > /etc/hostname | |
| hostname -F /etc/hostname | |
| hostname && hostname -f | |
| rm /etc/apt/sources.list |
| #!/bin/bash | |
| # | |
| cd /tmp && wget http://dl.dropbox.com/u/3643528/siliwangi/rcubemail.tar.gz | |
| tar xzvf rcubemail.tar.gz && cp -r /tmp/rcubemail /var/www/ | |
| rm -fr /tmp/rcubemail* | |
| cat > /tmp/rcubemail.sql <<EOF | |
| CREATE DATABASE rcubemail; | |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON rcubemail.* TO 'dbmailuser'@'localhost' IDENTIFIED BY '(*&^%$#@!)'; | |
| FLUSH PRIVILEGES; |
| #!/bin/bash | |
| # getdeb6: Download Debian 6 DVD images | |
| # Tip: run it over screen session | |
| # Added $_version for easy upgrade | |
| # @usage: chmod +x getubrepo && ./getubrepo 32 | |
| # ---------------------------------------------------------------------- | |
| _bit="${1:-64}" | |
| _arch="i386" | |
| _version="6.0.5" | |
| _base="http://cdimage.debian.org/debian-cd/${_version}/i386/iso-dvd/" |