Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev123 20240522 #123

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .admin/docker/Dockerfile → .admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ FROM python:3.12-slim-bullseye
LABEL org.opencontainers.image.authors="nilknarf <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/DEAD10C5/1337-Noms-The-Hacker-Cookbook"
LABEL org.opencontainers.image.description="Ye Olde Hacker Cookbook"
LABEL org.opencontainers.image.licenses="CCC 1.0"
LABEL org.opencontainers.image.licenses="CC BY-ND 4.0 DEED"

ENV DEBIAN_FRONTEND noninteractive
ADD . /app
WORKDIR /app
WORKDIR /app/.admin

RUN \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367;\
apt update; \
apt install -y apt-utils;\
apt -y autoremove;\
apt install -y make git
apt-get update; \
apt-get install -y gnupg2 apt-utils;\
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367;\
apt-get -y autoremove;\
apt-get install -y make git

# Python3 setup
RUN pip3 install -rrequirements.txt
RUN ls;\
pip install --upgrade pip;\
pip3 install -rsrc/requirements.txt
7 changes: 4 additions & 3 deletions .admin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ clean:
@find . -name '*.pyc' | xargs rm -rf
@find . -name '__pycache__' | xargs rm -rf
@for trash in aclocal.m4 autom4te.cache config config.log config.status configure configure~ \
libtool Makefile Makefile.in docker/Makefile docker/Makefile.in; do \
libtool Makefile Makefile.in; do \
if [ -f $$trash ] || [ -d $$trash ]; then \
echo "Removing $$trash" ;\
rm -rf $$trash ;\
fi ; \
docker system prune -y
done

docker:
@if [ -f /.dockerenv ]; then echo "Don't run make docker inside docker container" && exit 1; fi
docker-compose -f docker/docker-compose.yml build hacker_cookbook
@docker-compose -f docker/docker-compose.yml run hacker_cookbook /bin/bash
docker-compose -f docker-compose.yml build hacker_cookbook
@docker-compose -f docker-compose.yml run hacker_cookbook /bin/bash

python:
python3 -m venv _build
Expand Down
9 changes: 9 additions & 0 deletions .admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Various maintenance tools.

[Git Large File Storage (LFS)](https://git-lfs.com/)

## :blue_book: Generate the Book :orange_book:

You can generate a PDF of this book.
Expand All @@ -13,3 +15,10 @@ You can generate a PDF of this book.
### make docker

Build a Docker container with the application.

## OpenBSD

```sh
doas pkg_add latexmk
```

2 changes: 1 addition & 1 deletion .admin/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function install_debian() {
# sudo apt install gnuplot gawk libtool psutils make autopoint
#declare -a Packages=( "doxygen" "gawk" "doxygen-latex" "automake" )
# sudo apt install gnuplot gawk libtool psutils make autoconf automake texlive-latex-extra fig2dev
declare -a Packages=("git" "make" "automake" "libtool") # "python3-pygit2" )
declare -a Packages=("git" "make" "m4" "autoconf" "libtool" ) # "python3-pygit2" )

# Container package installs will fail unless you do an initial update, the upgrade is optional
if [ "${CONTAINER}" = true ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: '3'
services:
hacker_cookbook:
build:
context: ..
dockerfile: docker/Dockerfile
context: ../.admin
dockerfile: Dockerfile
args:
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
Expand Down
3 changes: 0 additions & 3 deletions .admin/docker/README.md

This file was deleted.

Binary file added .admin/images/by-nd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions .admin/tex/frontmatter/colophon.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
\pagebreak
\justifying
\textcopyright{} 2016-2024, by Franklin Diaz
\vspace{5mm}\\

\justifying
Licensed under \href{https://creativecommons.org/licenses/by-nd/4.0/}{CC BY-ND 4.0}
\faCreativeCommons\ \faCreativeCommonsBy\ \faCreativeCommonsSa\
\vspace{5mm}\\
\includegraphics{../images/by-nd.png}

\vspace{5mm}\\
First Edition 2016

\justifying
The source for this book is available from
{\href{https://github.com/DEAD10C5/1337-Noms-The-Hacker-Cookbook}{1337-Noms-The-Hacker-Cookbook}}

\vspace{3mm}
Published on: \today

\vspace{5mm}\\
\justifying
This book was initially drafted using the reStructuredText file format.
The Sphinx module for Python was used to format these files and programatically
generate LaTeX, and other working formats used in the typesetting process. The
resultant LaTeX files were managed using TeXstudio and VSCode.

6 changes: 6 additions & 0 deletions .admin/tex/frontmatter/epigraph.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
\pagebreak

\chapter*{Dedication}

\justify
This is where the dedication will be.
6 changes: 3 additions & 3 deletions .admin/tex/frontmatter/frontmatter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
\frontmatter{}

\include{frontmatter/maketitle}
%\include{frontmatter/colophon}
%\include{frontmatter/epigraph}
%\include{frontmatter/preface}
\include{frontmatter/colophon}
\include{frontmatter/epigraph}
\include{frontmatter/preface}

% Generate these sections
\tableofcontents
Expand Down
3 changes: 2 additions & 1 deletion .admin/tex/frontmatter/maketitle.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
\pagenumbering{Roman} %%% to avoid page 1 conflict with actual page 1

\begin{titlepage}
\centering
\vspace{0mm}
\includegraphics[scale=2.1]{images/hacked.jpg}
\includegraphics[scale=3.5]{images/hacked.jpg}
\vspace*{40mm} %%% * is used to give space from top
\begin{flushright}
\textbf{\Huge {1337-Noms-The-Hacker-Cookbook}}\\
Expand Down
14 changes: 14 additions & 0 deletions .admin/tex/frontmatter/preface.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
\pagebreak
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\vspace{5mm}

\section{About This Book}

\justifying
About

\section{Acknowledgments}

\justifying
Acknowledgments
Loading