Skip to content

Commit

Permalink
hackconf
Browse files Browse the repository at this point in the history
  • Loading branch information
debel committed Sep 30, 2017
1 parent 43d27ed commit 4759f61
Show file tree
Hide file tree
Showing 25 changed files with 398 additions and 166 deletions.
57 changes: 55 additions & 2 deletions build/bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -1736,11 +1736,33 @@ based on dark.css by Ivan Sagalaev
font-weight: bold;
}

.overflown {
padding-bottom: 40px !important;
pre {
width: auto;
}

code {
font-size: 1.5em !important;
line-height: 1.05em !important;
max-height: 100% !important;
overflow: visible !important;
}

.slides {
font-size: 1.5em !important;
}

.underlined {
text-decoration: underline;
}

.italic {
font-style: italic;
}

.bold {
font-style: bold;
}

.inline-code {
color: salmon;
background-color: #636363;
Expand All @@ -1749,3 +1771,34 @@ based on dark.css by Ivan Sagalaev
.warning {
color: salmon;
}

#title>h1 {
margin-bottom: 0;
}

#title>h2 {
margin-top: 0;
margin-left: 25%;
}

#title>img {
transform: rotate(-33deg) scale(2);
position: relative;
left: 220px;
top: 420px;
background: none;
border: none;
}

#meme-2>h3 {
margin-bottom: 0;
}

#command_types>span {
vertical-align: top;
padding-right: 50px;
}

#command_types>ul ul {
list-style: none;
}
12 changes: 6 additions & 6 deletions build/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -5054,12 +5054,12 @@ snippets.forEach(snippet => {
});

Reveal.initialize({
width: 1024,
height: 768,
margin: 0.1,
minScale: 0.1,
maxScale: 1.3,
transition: 'fade',
width: 1920,
height: 1080,
margin: 0.01,
minScale: 0.5,
maxScale: 1.5,
transition: 'random',
transitionSpeed: 'fast',
controls: true,
history: true
Expand Down
57 changes: 55 additions & 2 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
.overflown {
padding-bottom: 40px !important;
pre {
width: auto;
}

code {
font-size: 1.5em !important;
line-height: 1.05em !important;
max-height: 100% !important;
overflow: visible !important;
}

.slides {
font-size: 1.5em !important;
}

.underlined {
text-decoration: underline;
}

.italic {
font-style: italic;
}

.bold {
font-style: bold;
}

.inline-code {
color: salmon;
background-color: #636363;
Expand All @@ -11,3 +33,34 @@
.warning {
color: salmon;
}

#title>h1 {
margin-bottom: 0;
}

#title>h2 {
margin-top: 0;
margin-left: 25%;
}

#title>img {
transform: rotate(-33deg) scale(2);
position: relative;
left: 220px;
top: 420px;
background: none;
border: none;
}

#meme-2>h3 {
margin-bottom: 0;
}

#command_types>span {
vertical-align: top;
padding-right: 50px;
}

#command_types>ul ul {
list-style: none;
}
141 changes: 141 additions & 0 deletions extra-slides.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html>

<head>
<title>Git Panic and how to avoid it: Extra slides</title>
<meta charset="utf-8">
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="description" content="A presentation about advanced git topics and using git the right way" />
<link rel="stylesheet" href="build/bundle.css" />
</head>

<body>
<div id="presentation" class="reveal">
<div class="slides">
<section id="title">
<h1>Git Panic</h1>
<h2>and how to avoid it</h2>
<h3>/ super hidden extra slides /</h3>
</section>
<section id="remote-names">
<h3>Attack of the clones</h3>
<div>If you have multiple remotes, use "clone -o"<br /> to set a more meaningful remote name than "origin"</div>
<pre><code class="bash">
# Use -o to give a meaningful name to the remote
git clone REMOTE_URL -o "remote_name"
</code></pre>
</section>
<section id="normal-vs-bare">
<h3>Normal vs bare init</h3>
<pre><code class="bash">
# bare repos don't have a working tree
# which is useful for a shared remote
git init vs git init --bare
</code></pre>
<img src="images/normal-vs-bare.png" />
</section>

<section id="checkout-m">
<h3>That's for another branch</h3>
<div>Use "-m" if you have changes to your work tree<br/>
that you need to move to a different branch</div>
<pre><code class="bash">
# by default checkout refuses to switch branches
# if your work directory is dirty

# "-m" does a three-way merge between the current branch
# your working tree contents, and the new branch
git checkout -m &lt;commitish&gt;
</code></pre>
</section>

<section id="stash">
<h3>The stash is like a branch</h3>
<div>The dog ate my stash, maaan</div>
<pre><code class="bash">
# save unfinished work as a new commit
git stash save -p "unfinished work"

# stash list and reflog stash are the same
git stash list
git reflog stash

# stash show and show stash are the same
git stash show -p
git show stash@{0}

# pop vs apply
git stash pop stash@{1}
git stash apply stash@{1}
</code></pre>
</section>

<section id="hooks">
<h3>Git hooks</h3>
<img width="50%" src="images/git-hooks.jpg" />
</section>
<section id="pre-commit-hook">
<h3>Example pre-commit hook</h3>
<pre><code class="bash">
# .git/hooks/pre-commit
# hook must be executable
#!/bin/sh

# run linter and tests
# if either commands exit status is non zero
# the commit process will be canceled
npm run lint
npm run test
</code></pre>
</section>
<section id="message-template-hook">
<h3>Example commit message template hook</h3>
<pre><code class="bash">
# .git/hooks/prepare-commit-msg
# hook must be executable
#!/bin/sh

# puts the name of the current branch
# in the commit message template
echo "[`git rev-parse --abbrev-ref HEAD`] \
MESSAGE HERE" > "$1"
</code></pre>
</section>
<section id="deployment-hook">
<h3>Example simple deployment hook</h3>
<pre><code class="bash">
# .git/hooks/post-receive
# hook must be executable
GIT_WORK_TREE=/app_code git checkout master -f
cd /app_code
npm install
npm run build
npm run restart
echo "deployed"
</code></pre>
</section>
<section id="the-end">
<h3>No more slides, go away</h3>
<img width="45%" src="images/dev-by-0.jpg" />
</section>
</div>
<script src="build/bundle.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

ga('create', 'UA-93032616-1', 'auto');
ga('send', 'pageview');
</script>
</body>

</html>
Binary file added images/HC17_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/add-p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cherry-pick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/detached-head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dev-by-0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dont-ignore-the-symptoms.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/dontpanic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fix-it-meeseeks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/git-blame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/git-checkout-p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/git-is-hard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/git-log-nice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/git-reflog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/git-reset-p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/house-how-do-we-fix-this.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/meeseeks-box-qa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/rebase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/refs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/revert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4759f61

Please sign in to comment.