\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{Olivier DOLE (wyoliv)} \pdfinfo{ /Title (genbox.pdf) /Creator (Cheatography) /Author (Olivier DOLE (wyoliv)) /Subject (Genbox 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}{6B7EB7} \definecolor{LightBackground}{HTML}{F5F6FA} \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{Genbox Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Olivier DOLE (wyoliv)} via \textcolor{DarkBackground}{\uline{cheatography.com/25703/cs/6826/}}} \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}Olivier DOLE (wyoliv) \\ \uline{cheatography.com/wyoliv} \\ \uline{\seqsplit{www}.frogbywyplay.com/} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 1st February, 2016.\\ Updated 12th 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{tabularx}{17.67cm}{x{2.3618 cm} x{7.5915 cm} x{6.9167 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Setup}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Action}} & {\bf{Genbox-0.9}} & {\bf{Genbox-1.x}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Install} & `sh ./install.sh`\{\{nl\}\}`sudo \seqsplit{/opt/genbox/bin/genbox-ng} -{}-image -{}-download`\{\{nl\}\}`sudo \seqsplit{/opt/genbox/bin/genbox-ng} -{}-image -{}-set-default gbx-0.9` & `sudo \seqsplit{./genbox-installer} /opt/genbox` \tn % Row Count 10 (+ 8) % Row 2 \SetRowColor{LightBackground} Enter & `sudo \seqsplit{/opt/genbox/bin/genbox-ng`} & `sudo \seqsplit{/opt/genbox/sbin/genbox`} \tn % Row Count 12 (+ 2) % Row 3 \SetRowColor{white} Enter as user & Not applicable & `sudo \seqsplit{/opt/genbox/sbin/genbox} -u` \tn % Row Count 15 (+ 3) % Row 4 \SetRowColor{LightBackground} \seqsplit{Uninstall} & `sudo rm -fr /opt/genbox/` & `sudo \seqsplit{/opt/genbox/sbin/genbox-wipe`} \tn % Row Count 18 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{10.0166 cm} x{7.2534 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Package management}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Action}} & {\bf{Genbox-0.9 and Genbox-1.x}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Update packages repositories & `emerge -{}-sync` \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Update installed packages & `emerge -uDavn world` \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Install package `\textless{}pkg\textgreater{}` & `emerge \textless{}pkg\textgreater{}` \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} Install package `\textless{}pkg\textgreater{}` at version `N` & `emerge =\textless{}pkg\textgreater{}-N` \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} Uninstall package `\textless{}pkg\textgreater{}` & `emerge -C \textless{}pkg\textgreater{}` \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} List all installed packages & `list` \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} List all files installed by package `\textless{}pkg\textgreater{}` & `equery files \textless{}pkg\textgreater{}` \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} List with which USE flags package `\textless{}pkg\textgreater{}` is installed & `equery uses \textless{}pkg\textgreater{}` \tn % Row Count 18 (+ 3) % Row 9 \SetRowColor{white} Find to which package belongs `\textless{}file\textgreater{}` file. & `equery belongs \textless{}file\textgreater{}` \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} Find which package(s) depends on package \textless{}pkg\textgreater{} & `equery depends \textless{}pkg\textgreater{}` \tn % Row Count 22 (+ 2) % Row 11 \SetRowColor{white} Handle configuration file updates & `etc-update` \tn % Row Count 24 (+ 2) % Row 12 \SetRowColor{LightBackground} Find packages matching `\textless{}pattern\textgreater{}` & `emerge -s \textless{}pattern\textgreater{}` \tn % Row Count 26 (+ 2) % Row 13 \SetRowColor{white} Display path to the ebuild used to install package `\textless{}pkg\textgreater{}` & `equery which \textless{}pkg\textgreater{}` \tn % Row Count 29 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{The previous commands are valid for host packages. For target packages, use: \{\{nl\}\} - {\bf{xmerge}} instead of {\bf{emerge}} \{\{nl\}\} - {\bf{xlist}} instead of {\bf{list}} \{\{nl\}\} - {\bf{xquery}} {\emph{(Genbox-1.x)}} or {\bf{xexec equery}} {\emph{(Genbox-0.9)}} instead of {\bf{equery}} \{\{nl\}\} - {\bf{xtc-update}} instead of {\bf{etc-update}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.748 cm} x{7.2541 cm} x{2.8679 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Overlay management}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Action}} & {\bf{Genbox-0.9}} & {\bf{Genbox-1.x}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} List available host\textasciicircum{}*\textasciicircum{} overlays & Not applicable & \seqsplit{`layman} -L` \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} List installed host\textasciicircum{}*\textasciicircum{} overlays & `eov -{}-list` & \seqsplit{`layman} -l` \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Update all host\textasciicircum{}*\textasciicircum{} overlays & Not applicable & \seqsplit{`layman} -S` \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Update host\textasciicircum{}*\textasciicircum{} overlay `\textless{}ov\textgreater{}` & `eov -{}-sync \textless{}ov\textgreater{}` & \seqsplit{`layman} -s \textless{}ov\textgreater{}` \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} Add overlay \textless{}ov\textgreater{} & `eov -{}-add \textless{}ov\textgreater{} -{}-uri=\textless{}uri\textgreater{} -{}-proto=\textless{}proto\textgreater{} -{}-branch=\textless{}branch\textgreater{}` & \seqsplit{`layman} -a \textless{}ov\textgreater{}` \tn % Row Count 16 (+ 4) % Row 6 \SetRowColor{LightBackground} Remove overlay \textless{}ov\textgreater{} & `eov -{}-rm \textless{}ov\textgreater{}` & \seqsplit{`layman} -d \textless{}ov\textgreater{}` \tn % Row Count 19 (+ 3) % Row 7 \SetRowColor{white} Display information about overlay \textless{}ov\textgreater{} & Not applicable & \seqsplit{`layman} -i \textless{}ov\textgreater{}` \tn % Row Count 22 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{17.67cm}}{\textasciicircum{}*\textasciicircum{} To do the same actions for the target, use {\bf{xov}} instead of {\bf{eov}} for Genbox-0.9 and {\bf{xlayman}} instead of {\bf{layman}} for Genbox-1.x.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{8.635 cm} x{8.635 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Target management}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Action}} & {\bf{Genbox-0.9 and Genbox-1.x}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} List available targets matching `\textless{}pattern\textgreater{}` & `xtarget -pv \textless{}pattern\textgreater{}` \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} List installed targets & `xtarget -lv` \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Set `\textless{}foo\textgreater{}` as current target & `xtarget -s \textless{}foo\textgreater{}` \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Sync target description overlay & `xtarget -{}-sync` \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} Install target `\textless{}tgt\textgreater{}` for arch `\textless{}arch\textgreater{}` & `xtarget -c -a \textless{}arch\textgreater{} \textless{}tgt\textgreater{}` \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} Install target `\textless{}tgt\textgreater{}` at version `1.2.3` for arch `\textless{}arch\textgreater{}` & `xtarget -c -a \textless{}arch\textgreater{} =\textless{}tgt\textgreater{}-1.2.3` \tn % Row Count 16 (+ 3) % Row 7 \SetRowColor{white} Update target repositories & `xmerge -{}-sync`\textasciicircum{}*\textasciicircum{} \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} Update target packages & `xmerge -uDavn world` \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} Install package `\textless{}pkg\textgreater{}` at version `N` & `xmerge =\textless{}pkg\textgreater{}-N` \tn % Row Count 22 (+ 2) % Row 10 \SetRowColor{LightBackground} Install masked\textasciicircum{}**\textasciicircum{} package `\textless{}pkg\textgreater{}` & \seqsplit{`FEATURES="nopackages"} xmerge \textless{}pkg\textgreater{}`\{\{nl\}\}`xmerge -{}-ignore-profile-version \textless{}pkg\textgreater{}` {\emph{(Genbox2016 only)}}\{\{nl\}\}`xmerge -I \textless{}pkg\textgreater{}` {\emph{(Genbox2016 only)}} \tn % Row Count 30 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{\textasciicircum{}{\emph{\textasciicircum{} Currently, Genbox-1.x is unable to correctly sync a mercurial repository. \newline \textasciicircum{}}}*\textasciicircum{} Only valid for packages masked by version. It won't work with packages masked by 'corruption', 'missing keyword', 'license', 'eapi'...} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Working with target}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Action}} & {\bf{Genbox-0.9}} & {\bf{Genbox-1.x}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Setup a shell with target environment & `xshell` & `xshell` \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} Test target ebuild `\textless{}eb\textgreater{}` installation & `xbuild \textless{}eb\textgreater{} clean fetch unpack compile install` & `xbuild \textless{}eb\textgreater{} clean install` \tn % Row Count 9 (+ 4) % Row 3 \SetRowColor{white} Add package `\textless{}pkg\textgreater{}` at version `\textless{}ver\textgreater{}` to target profile & `echo "*\textless{}pkg\textgreater{}" \textgreater{}\textgreater{} packages \{\{nl\}\}echo "=\textless{}pkg\textgreater{}-\textless{}ver\textgreater{}" \textgreater{}\textgreater{} packages` & `echo "*\textless{}pkg\textgreater{}" \textgreater{}\textgreater{} packages \{\{nl\}\} echo "\textgreater{}\textless{}pkg\textgreater{}-\textless{}ver\textgreater{}" \textgreater{}\textgreater{} \seqsplit{package.mask`} \tn % Row Count 15 (+ 6) % Row 4 \SetRowColor{LightBackground} Update package \textless{}pkg\textgreater{} at version `\textless{}ver+1\textgreater{}` in target profile & Edit `packages` file & Edit \seqsplit{`package.mask`} file \tn % Row Count 20 (+ 5) % Row 5 \SetRowColor{white} Bump package `\textless{}pkg\textgreater{}` locally cloned in `\textless{}src\textgreater{}` directory & `bosse -i \textless{}src\textgreater{}` & Not ported yet \tn % Row Count 25 (+ 5) % Row 6 \SetRowColor{LightBackground} Bump target `\textless{}tgt\textgreater{}` based on template ebuild `\textless{}eb\textgreater{}` & `xbump -u \textless{}eb\textgreater{} -{}-tag` & Not ported yet \tn % Row Count 29 (+ 4) % Row 7 \SetRowColor{white} Create a prebuilt for target `\textless{}tgt\textgreater{}` with architecture `\textless{}arch\textgreater{}` & `xbuilder -a \textless{}arch\textgreater{} =\textless{}tgt\textgreater{}` & `xbuilder -a \textless{}arch\textgreater{} =\textless{}tgt\textgreater{}` \tn % Row Count 34 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.5671 cm} x{5.061 cm} x{6.2419 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{Important files changes}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Utility}} & {\bf{Genbox-0.9}} & {\bf{Genbox-1.x}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Custom settings for Portage & \seqsplit{`/etc/make.conf`} & \seqsplit{`/etc/portage/make}.conf` \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} Symlink to profile & \seqsplit{`/etc/make.profile`} & \seqsplit{`/etc/portage/make}.profile` \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Host overlay base directory & \seqsplit{`/usr/local/portage`} & \seqsplit{`/var/lib/layman/`} {\emph{(configurable)}} \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} Overlay manager \seqsplit{configuration} files & \seqsplit{`/etc/xov.conf`} & \seqsplit{`/etc/layman/layman}.cfg` \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} `xbuild` destination directory & `\$\{ROOT\}/work/\$\{CATEGORY\}/\$\{PF\}` & `\$\{ROOT\}/xbuild/portage/\$\{CATEGORY\}/\$\{PF\}` \tn % Row Count 16 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \end{document}