Skip to content

Commit 9dee4b2

Browse files
committed
Add exercises slide
1 parent d5a20b4 commit 9dee4b2

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,13 @@ presentation.pdf: $(PYTHON_FILES:%.py=%.py.include)
5454

5555
clean::
5656
rm -f *.out *.include
57+
58+
GH_CURL = curl -sSH "Authorization: token $$(grep oauth_token ~/.config/hub | head -n1 | awk '{print $$2}')"
59+
60+
upload: presentation.pdf
61+
EXISTING_RELEASE_ID=$$(${GH_CURL} https://api.github.com/repos/py-yyc/git-init/releases/tags/v0.0.0 | jq .id); \
62+
if [ -n "$$EXISTING_RELEASE_ID" ]; then \
63+
${GH_CURL} -X DELETE https://api.github.com/repos/py-yyc/git-init/releases/$$EXISTING_RELEASE_ID; \
64+
fi
65+
hub release create -p -a presentation.pdf -m Slides v0.0.0
66+

attendees.txt

Whitespace-only changes.

presentation.tex

+40-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
\usepackage{fontspec}
1616

17-
\hypersetup{hidelinks,pdfpagemode=}
17+
\hypersetup{pdfpagemode=,colorlinks=true,urlcolor=blue}
1818

19-
\urlstyle{same}
19+
%\urlstyle{same}
2020

2121
\newcommand*{\sizefont}[1]{%
2222
\ifcase#1\relax
@@ -100,11 +100,14 @@
100100
\tableofcontents
101101
\end{frame}
102102

103-
\section{Introduction}
103+
\section{Version control}
104104

105105
\def\fillinblank{\_\_\_\_}
106106

107-
\begin{frame}{Version control}
107+
\begin{frame}{Basics of version control}
108+
\begin{itemize}
109+
\item Tracking who made what changes, when, and why, gets very complicated
110+
\end{itemize}
108111
\end{frame}
109112

110113
% \begin{frame}
@@ -121,7 +124,40 @@ \section{Introduction}
121124
\END
122125
\end{frame}
123126
127+
\section{Version control with git}
128+
129+
\section{Digging deeper}
130+
131+
\begin{frame}
132+
\begin{itemize}
133+
\item \texttt{git cat-file -p \textit{thing}}
134+
\item \texttt{\detokenize{git cat-file -p HEAD^{tree}}}
135+
\item \texttt{git cat-file tree \textit{hash} | hexdump -C}
136+
\end{itemize}
137+
138+
% https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
139+
140+
\end{frame}
141+
142+
\section{Conclusion}
143+
124144
\begin{frame}{Conclusion}
125145
\end{frame}
126146
147+
\section{Exercises}
148+
149+
\begin{frame}{Exercises}
150+
\begin{itemize}
151+
\item Install git
152+
\item Create a new repo locally and commit some changes
153+
\item Check out \href{https://github.com/py-yyc/git-init}{github.com/py-yyc/git-init}
154+
\item Send a pull request with your change
155+
\end{itemize}
156+
Advanced:
157+
\begin{itemize}
158+
\item Extend the hash-computing code to work with directories and multiple
159+
commits
160+
\end{itemize}
161+
\end{frame}
162+
127163
\end{document}

python-interpret

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import time
1313
import tokenize
1414

1515
# Not used by this script, but allows snippets to skip the import
16-
import datetime
17-
import pendulum
16+
from tempfile import TemporaryDirectory
1817

1918
try:
2019
last_t_type = None

0 commit comments

Comments
 (0)