\documentclass[10pt,a4paper]{article}

% Packages
\usepackage{fancyhdr}           % For header and footer
\usepackage{multicol}           % Allows multicols in tables
\usepackage{tabularx}           % Intelligent column widths
\usepackage{tabulary}           % Used in header and footer
\usepackage{hhline}             % Border under tables
\usepackage{graphicx}           % For images
\usepackage{xcolor}             % For hex colours
%\usepackage[utf8x]{inputenc}    % For unicode character support
\usepackage[T1]{fontenc}        % Without this we get weird character replacements
\usepackage{colortbl}           % For coloured tables
\usepackage{setspace}           % For line height
\usepackage{lastpage}           % Needed for total page number
\usepackage{seqsplit}           % Splits long words.
%\usepackage{opensans}          % Can't make this work so far. Shame. Would be lovely.
\usepackage[normalem]{ulem}     % For underlining links
% Most of the following are not required for the majority
% of cheat sheets but are needed for some symbol support.
\usepackage{amsmath}            % Symbols
\usepackage{MnSymbol}           % Symbols
\usepackage{wasysym}            % Symbols
%\usepackage[english,german,french,spanish,italian]{babel}              % Languages

% Document Info
\author{lopper69}
\pdfinfo{
  /Title (drush-version-5-dev-commands.pdf)
  /Creator (Cheatography)
  /Author (lopper69)
  /Subject (Drush version 5-dev commands Cheat Sheet)
}

% Lengths and widths
\addtolength{\textwidth}{6cm}
\addtolength{\textheight}{-1cm}
\addtolength{\hoffset}{-3cm}
\addtolength{\voffset}{-2cm}
\setlength{\tabcolsep}{0.2cm} % Space between columns
\setlength{\headsep}{-12pt} % Reduce space between header and content
\setlength{\headheight}{85pt} % If less, LaTeX automatically increases it
\renewcommand{\footrulewidth}{0pt} % Remove footer line
\renewcommand{\headrulewidth}{0pt} % Remove header line
\renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit
% This two commands together give roughly
% the right line height in the tables
\renewcommand{\arraystretch}{1.3}
\onehalfspacing

% Commands
\newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour
\newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols
\newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns
\newcommand{\tn}{\tabularnewline} % Required as custom column type in use

% Font and Colours
\definecolor{HeadBackground}{HTML}{333333}
\definecolor{FootBackground}{HTML}{666666}
\definecolor{TextColor}{HTML}{333333}
\definecolor{DarkBackground}{HTML}{3652C2}
\definecolor{LightBackground}{HTML}{F2F4FB}
\renewcommand{\familydefault}{\sfdefault}
\color{TextColor}

% Header and Footer
\pagestyle{fancy}
\fancyhead{} % Set header to blank
\fancyfoot{} % Set footer to blank
\fancyhead[L]{
\noindent
\begin{multicols}{3}
\begin{tabulary}{5.8cm}{C}
    \SetRowColor{DarkBackground}
    \vspace{-7pt}
    {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent
        \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}}
    }
\end{tabulary}
\columnbreak
\begin{tabulary}{11cm}{L}
    \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Drush version 5-dev commands Cheat Sheet}}}} \\
    \normalsize{by \textcolor{DarkBackground}{lopper69} via \textcolor{DarkBackground}{\uline{cheatography.com/159/cs/146/}}}
\end{tabulary}
\end{multicols}}

\fancyfoot[L]{ \footnotesize
\noindent
\begin{multicols}{3}
\begin{tabulary}{5.8cm}{LL}
  \SetRowColor{FootBackground}
  \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}}  \\
  \vspace{-2pt}lopper69 \\
  \uline{cheatography.com/lopper69} \\
  \end{tabulary}
\vfill
\columnbreak
\begin{tabulary}{5.8cm}{L}
  \SetRowColor{FootBackground}
  \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}}  \\
   \vspace{-2pt}Not Yet Published.\\
   Updated 13th May, 2016.\\
   Page {\thepage} of \pageref{LastPage}.
\end{tabulary}
\vfill
\columnbreak
\begin{tabulary}{5.8cm}{L}
  \SetRowColor{FootBackground}
  \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}}  \\
  \SetRowColor{white}
  \vspace{-5pt}
  %\includegraphics[width=48px,height=48px]{dave.jpeg}
  Measure your website readability!\\
  www.readability-score.com
\end{tabulary}
\end{multicols}}




\begin{document}
\raggedright
\raggedcolumns

% Set font size to small. Switch to any value
% from this page to resize cheat sheet text:
% www.emerson.emory.edu/services/latex/latex_169.html
\footnotesize % Small font.

\begin{multicols*}{3}

\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core Commands}}  \tn
% Row 0
\SetRowColor{LightBackground}
archive-dump {\emph{(ard, archive-backup, arb)}} & Backup your code, files, and database into a single file. \tn 
% Row Count 3 (+ 3)
% Row 1
\SetRowColor{white}
archive-restore \textless{}br/\textgreater{}{\emph{arr}} & Expand a site archive into a Drupal web site. \tn 
% Row Count 6 (+ 3)
% Row 2
\SetRowColor{LightBackground}
cache-clear {\emph{cc}} & Clear a specific cache, or all drupal caches. \tn 
% Row Count 9 (+ 3)
% Row 3
\SetRowColor{white}
cache-get {\emph{cg}} & Fetch a cached object and display it. \tn 
% Row Count 11 (+ 2)
% Row 4
\SetRowColor{LightBackground}
cache-set {\emph{cs}} & Cache an object expressed in JSON or var\_export() format. \tn 
% Row Count 14 (+ 3)
% Row 5
\SetRowColor{white}
core-config {\emph{conf, config}} & Edit drushrc, site alias, and Drupal settings.php files. \tn 
% Row Count 17 (+ 3)
% Row 6
\SetRowColor{LightBackground}
core-cron {\emph{cron}} & Run all cron hooks in all active modules for specified site. \tn 
% Row Count 20 (+ 3)
% Row 7
\SetRowColor{white}
core-execute {\emph{exec, execute}} & Execute a shell command. Usually used with a site alias. \tn 
% Row Count 23 (+ 3)
% Row 8
\SetRowColor{LightBackground}
core-quick-drupal {\emph{qd}} & Download, install, serve and login to Drupal with minimal configuration and dependencies. \tn 
% Row Count 28 (+ 5)
% Row 9
\SetRowColor{white}
core-rsync {\emph{rsync}} & Rsync the Drupal tree to/from another server using ssh. \tn 
% Row Count 31 (+ 3)
\end{tabularx}
\par\addvspace{1.3em}

\vfill
\columnbreak
\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core Commands (cont)}}  \tn
% Row 10
\SetRowColor{LightBackground}
core-status {\emph{status, st}} & Provides a birds-eye view of the current Drupal installation, if any. \tn 
% Row Count 4 (+ 4)
% Row 11
\SetRowColor{white}
core-topic {\emph{topic}} & Read detailed documentation on a given topic. \tn 
% Row Count 7 (+ 3)
% Row 12
\SetRowColor{LightBackground}
drupal-directory {\emph{dd}} & Return path to a given module/theme directory. \tn 
% Row Count 10 (+ 3)
% Row 13
\SetRowColor{white}
help & Print this help message. See `drush help help` for more options. \tn 
% Row Count 14 (+ 4)
% Row 14
\SetRowColor{LightBackground}
image-flush & Flush all derived images for a given style. \tn 
% Row Count 17 (+ 3)
% Row 15
\SetRowColor{white}
php-eval {\emph{eval, ev}} & Evaluate arbitrary php code after bootstrapping Drupal (if available). \tn 
% Row Count 21 (+ 4)
% Row 16
\SetRowColor{LightBackground}
php-script & Run php script(s). \tn 
% Row Count 22 (+ 1)
% Row 17
\SetRowColor{white}
search-index & Index the remaining search items without wiping the index. \tn 
% Row Count 25 (+ 3)
% Row 18
\SetRowColor{LightBackground}
search-reindex & Force the search index to be rebuilt. \tn 
% Row Count 27 (+ 2)
% Row 19
\SetRowColor{white}
search-status & Show how many items remain to be indexed out of the total. \tn 
% Row Count 30 (+ 3)
\end{tabularx}
\par\addvspace{1.3em}

\vfill
\columnbreak
\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core Commands (cont)}}  \tn
% Row 20
\SetRowColor{LightBackground}
self-update {\emph{selfupdate}} & Check to see if there is a newer Drush release available. \tn 
% Row Count 3 (+ 3)
% Row 21
\SetRowColor{white}
shell-alias {\emph{sha}} & Print all known shell alias records. \tn 
% Row Count 5 (+ 2)
% Row 22
\SetRowColor{LightBackground}
site-alias {\emph{sa}} & Print site alias records for all known site aliases and local sites. \tn 
% Row Count 9 (+ 4)
% Row 23
\SetRowColor{white}
site-install {\emph{si}} & Install Drupal along with \seqsplit{modules/themes/configuration} using the specified install profile. \tn 
% Row Count 14 (+ 5)
% Row 24
\SetRowColor{LightBackground}
site-ssh {\emph{ssh}} & Connect to a Drupal site's server via SSH for an interactive session or to run a shell command \tn 
% Row Count 19 (+ 5)
% Row 25
\SetRowColor{white}
site-upgrade {\emph{sup}} & Run a major version upgrade for Drupal (e.g. Drupal 6 to Drupal 7). A copy of the site is made, and then upgraded; the source site is not changed. \tn 
% Row Count 27 (+ 8)
% Row 26
\SetRowColor{LightBackground}
test-clean & Clean temporary tables and files. \tn 
% Row Count 29 (+ 2)
% Row 27
\SetRowColor{white}
test-run & Run tests. Note that you must use the -{}-uri option. \tn 
% Row Count 32 (+ 3)
\end{tabularx}
\par\addvspace{1.3em}

\vfill
\columnbreak
\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Core Commands (cont)}}  \tn
% Row 28
\SetRowColor{LightBackground}
updatedb {\emph{updb}} & Apply any database updates required (as with running update.php). \tn 
% Row Count 4 (+ 4)
% Row 29
\SetRowColor{white}
variable-delete {\emph{vdel}} & Delete a variable. \tn 
% Row Count 6 (+ 2)
% Row 30
\SetRowColor{LightBackground}
variable-get {\emph{vget}} & Get a list of some or all site variables and values. \tn 
% Row Count 9 (+ 3)
% Row 31
\SetRowColor{white}
variable-set {\emph{vset}} & Set a variable. \tn 
% Row Count 10 (+ 1)
% Row 32
\SetRowColor{LightBackground}
version & Show drush version. \tn 
% Row Count 11 (+ 1)
% Row 33
\SetRowColor{white}
watchdog-delete {\emph{wd-del, wd-delete}} & Delete watchdog messages. \tn 
% Row Count 13 (+ 2)
% Row 34
\SetRowColor{LightBackground}
watchdog-list {\emph{wd-list}} & Show available message types and severity levels. A prompt will ask for a choice to show watchdog messages. \tn 
% Row Count 19 (+ 6)
% Row 35
\SetRowColor{white}
watchdog-show {\emph{wd-show, ws}} & Show watchdog messages. \tn 
% Row Count 21 (+ 2)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Field commands}}  \tn
% Row 0
\SetRowColor{LightBackground}
\seqsplit{field-clone} & Clone a field and all its instances. \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
\seqsplit{field-create} & Create fields and instances. Returns urls for field editing. \tn 
% Row Count 4 (+ 2)
% Row 2
\SetRowColor{LightBackground}
\seqsplit{field-delete} & Delete a field and its instances. \tn 
% Row Count 6 (+ 2)
% Row 3
\SetRowColor{white}
\seqsplit{field-info} & View information about fields, field\_types, and widgets. \tn 
% Row Count 8 (+ 2)
% Row 4
\SetRowColor{LightBackground}
\seqsplit{field-update} & Return URL for field editing web page. \tn 
% Row Count 10 (+ 2)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Project manager commands}}  \tn
% Row 0
\SetRowColor{LightBackground}
\seqsplit{pm-disable} & Disable one or more extensions (modules or themes). \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
\seqsplit{pm-download} & Download projects from drupal.org or other sources. \tn 
% Row Count 4 (+ 2)
% Row 2
\SetRowColor{LightBackground}
pm-enable & Enable one or more extensions (modules or themes). \tn 
% Row Count 6 (+ 2)
% Row 3
\SetRowColor{white}
pm-info & Show detailed info for one or more extensions (modules or themes). \tn 
% Row Count 9 (+ 3)
% Row 4
\SetRowColor{LightBackground}
pm-list & Show a list of available extensions (modules and themes). \tn 
% Row Count 11 (+ 2)
% Row 5
\SetRowColor{white}
\seqsplit{pm-refresh} & Refresh update status information. \tn 
% Row Count 13 (+ 2)
% Row 6
\SetRowColor{LightBackground}
\seqsplit{pm-releasenotes} & Print release notes for given projects. \tn 
% Row Count 15 (+ 2)
% Row 7
\SetRowColor{white}
\seqsplit{pm-releases} & Print release information for given projects. \tn 
% Row Count 17 (+ 2)
% Row 8
\SetRowColor{LightBackground}
\seqsplit{pm-uninstall} & Uninstall one or more modules. \tn 
% Row Count 19 (+ 2)
% Row 9
\SetRowColor{white}
pm-update & Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb). \tn 
% Row Count 23 (+ 4)
% Row 10
\SetRowColor{LightBackground}
\seqsplit{pm-updatecode} & Update Drupal core and contrib projects to latest recommended releases. \tn 
% Row Count 26 (+ 3)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{SQL commands}}  \tn
% Row 0
\SetRowColor{LightBackground}
sql-cli & Open a SQL command-line interface using Drupal's credentials. \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
\seqsplit{sql-connect} & A string for connecting to the DB. \tn 
% Row Count 4 (+ 2)
% Row 2
\SetRowColor{LightBackground}
\seqsplit{sql-drop} & Drop all tables in a given database. \tn 
% Row Count 6 (+ 2)
% Row 3
\SetRowColor{white}
\seqsplit{sql-dump} & Exports the Drupal DB as SQL using mysqldump or equivalent. \tn 
% Row Count 8 (+ 2)
% Row 4
\SetRowColor{LightBackground}
\seqsplit{sql-query} & Execute a query against the site database. \tn 
% Row Count 10 (+ 2)
% Row 5
\SetRowColor{white}
\seqsplit{sql-sync} & Copy and import source database to target database. Transfers via rsync \tn 
% Row Count 13 (+ 3)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{User commands}}  \tn
% Row 0
\SetRowColor{LightBackground}
\seqsplit{user-add-role} & Add a role to the specified user accounts. \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
user-block & Block the specified user(s). \tn 
% Row Count 3 (+ 1)
% Row 2
\SetRowColor{LightBackground}
\seqsplit{user-cancel} & Cancel a user account with the specified name. \tn 
% Row Count 5 (+ 2)
% Row 3
\SetRowColor{white}
\seqsplit{user-create} & Create a user account with the specified name. \tn 
% Row Count 7 (+ 2)
% Row 4
\SetRowColor{LightBackground}
\seqsplit{user-information} & Print information about the specified user(s). \tn 
% Row Count 9 (+ 2)
% Row 5
\SetRowColor{white}
user-login & Display a one time login link for the given user account (defaults to uid 1). \tn 
% Row Count 12 (+ 3)
% Row 6
\SetRowColor{LightBackground}
\seqsplit{user-password} & (Re)Set the password for the user account with the specified name. \tn 
% Row Count 15 (+ 3)
% Row 7
\SetRowColor{white}
\seqsplit{user-remove-role} & Remove a role from the specified user accounts. \tn 
% Row Count 17 (+ 2)
% Row 8
\SetRowColor{LightBackground}
\seqsplit{user-unblock} & Unblock the specified user(s). \tn 
% Row Count 19 (+ 2)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{All commands in devel}}  \tn
% Row 0
\SetRowColor{LightBackground}
\seqsplit{devel-download} & Downloads the FirePHP library from http://firephp.org/. \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
\seqsplit{devel-reinstall} & Disable, Uninstall, and Install a list of projects. \tn 
% Row Count 4 (+ 2)
% Row 2
\SetRowColor{LightBackground}
\seqsplit{devel-token} & List available tokens \tn 
% Row Count 6 (+ 2)
% Row 3
\SetRowColor{white}
fn-hook & List implementations of a given hook and explore source of specified one. \tn 
% Row Count 9 (+ 3)
% Row 4
\SetRowColor{LightBackground}
fn-view & Show the source of specified function or method. \tn 
% Row Count 11 (+ 2)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}

\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Global Options}}  \tn
% Row 0
\SetRowColor{LightBackground}
\mymulticolumn{2}{x{5.377cm}}{Global Options (see drush topic core-global-options for the full list)} \tn 
% Row Count 2 (+ 2)
% Row 1
\SetRowColor{white}
-r \textless{}path\textgreater{}, -{}-root=\textless{}path\textgreater{} & Drupal root directory to use (default: current directory). \tn 
% Row Count 5 (+ 3)
% Row 2
\SetRowColor{LightBackground}
-l \seqsplit{http://example.com:8888}, -{}-uri=http://example.com:8888 & URI of the drupal site to use (only needed in multisite environments or when running on an alternate port). \tn 
% Row Count 11 (+ 6)
% Row 3
\SetRowColor{white}
-v, -{}-verbose & Display extra information about the command. \tn 
% Row Count 14 (+ 3)
% Row 4
\SetRowColor{LightBackground}
\mymulticolumn{2}{x{5.377cm}}{-d, -{}-debug} \tn 
% Row Count 15 (+ 1)
% Row 5
\SetRowColor{white}
-y, -{}-yes & Display even more information, including internal messages. \tn 
% Row Count 18 (+ 3)
% Row 6
\SetRowColor{LightBackground}
-n, -{}-no & Assume 'yes' as answer to all prompts. \tn 
% Row Count 20 (+ 2)
% Row 7
\SetRowColor{white}
-s, -{}-simulate & Assume 'no' as answer to all prompts. \tn 
% Row Count 22 (+ 2)
% Row 8
\SetRowColor{LightBackground}
-p, -{}-pipe & Simulate all relevant actions (don't actually change the system). \tn 
% Row Count 26 (+ 4)
% Row 9
\SetRowColor{white}
-h, -{}-help & Emit a compact representation of the command for scripting. \tn 
% Row Count 29 (+ 3)
% Row 10
\SetRowColor{LightBackground}
-{}-version & This help system. \tn 
% Row Count 30 (+ 1)
\end{tabularx}
\par\addvspace{1.3em}

\vfill
\columnbreak
\begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} }
\SetRowColor{DarkBackground}
\mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Global Options (cont)}}  \tn
% Row 11
\SetRowColor{LightBackground}
-{}-php & Show drush version. \tn 
% Row Count 1 (+ 1)
% Row 12
\SetRowColor{white}
-ia, -{}-interactive & The absolute path to your PHP intepreter, if not 'php' in the path. \tn 
% Row Count 5 (+ 4)
% Row 13
\SetRowColor{LightBackground}
 & Force interactive mode for commands run on multiple targets (e.g. `drush @site1,@site2 cc -{}-ia`). \tn 
% Row Count 10 (+ 5)
\hhline{>{\arrayrulecolor{DarkBackground}}--}
\end{tabularx}
\par\addvspace{1.3em}


% That's all folks
\end{multicols*}

\end{document}