Skip to content

Commit caa5b8d

Browse files
author
Zed A. Shaw
committed
Initial commit.
0 parents  commit caa5b8d

File tree

232 files changed

+18547
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+18547
-0
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Videos
2+
.*.sw*
3+

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Learn C The Hard Way, Lectures
2+
==============================
3+
4+
This is a publicly accessible repository of code for readers of my book Learn C The Hard Way, including the lecture slides and code I create for each exericse and video.

Diff for: ex1/ex1

8.26 KB
Binary file not shown.

Diff for: ex1/ex1.c

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <stdio.h>
2+
3+
/* This is a comment. */
4+
int main(int argc, char *argv[])
5+
{
6+
int distance = 100;
7+
8+
// this is also a comment
9+
printf("You are %d miles away.\n");
10+
11+
return 0;
12+
}

Diff for: ex1/ex1_zed

8.26 KB
Binary file not shown.

Diff for: ex1/ex1_zed.c

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <stdio.h>
2+
3+
/* This is a comment. */
4+
int main(int argc, char *argv[]) {
5+
int distance = 100;
6+
7+
// this is also a comment
8+
printf("You are %d miles away.\n", distance);
9+
10+
return 0;
11+
}

Diff for: ex1/index.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
7+
<title>Learn C The Hard Way, Exercise 1 Lecture</title>
8+
9+
<meta name="description" content="Learn C The Hard Way, Exercise 1 Lecture">
10+
<meta name="author" content="Zed A. Shaw">
11+
12+
<meta name="apple-mobile-web-app-capable" content="yes" />
13+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14+
15+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16+
17+
<link rel="stylesheet" href="../static/css/reveal.css">
18+
<link rel="stylesheet" href="../static/css/theme/black.css" id="theme">
19+
20+
<!-- Code syntax highlighting -->
21+
<link rel="stylesheet" href="../static/lib/css/zenburn.css">
22+
23+
<!-- Printing and PDF exports -->
24+
<script>
25+
var link = document.createElement( 'link' );
26+
link.rel = 'stylesheet';
27+
link.type = 'text/css';
28+
link.href = window.location.search.match( /print-pdf/gi ) ? '../static/css/print/pdf.css' : '../static/css/print/paper.css';
29+
document.getElementsByTagName( 'head' )[0].appendChild( link );
30+
</script>
31+
32+
<!--[if lt IE 9]>
33+
<script src="../static/lib/js/html5shiv.js"></script>
34+
<![endif]-->
35+
</head>
36+
37+
<body>
38+
39+
<div class="reveal">
40+
41+
<!-- Any section element inside of this container is displayed as a slide -->
42+
<div class="slides">
43+
<section data-markdown="lecture.md"
44+
data-separator="^\n\n\n"
45+
data-separator-vertical="^\n\n"
46+
data-separator-notes="^Note:"
47+
data-charset="iso-8859-15">
48+
</section>
49+
</div>
50+
51+
</div>
52+
53+
<script src="../static/lib/js/head.min.js"></script>
54+
<script src="../static/js/reveal.js"></script>
55+
56+
<script>
57+
58+
// Full list of configuration options available at:
59+
// https://github.com/hakimel/reveal.js#configuration
60+
Reveal.initialize({
61+
controls: true,
62+
progress: true,
63+
history: true,
64+
center: true,
65+
66+
transition: 'slide', // none/fade/slide/convex/concave/zoom
67+
68+
// Optional reveal.js plugins
69+
dependencies: [
70+
{ src: '../static/lib/js/classList.js', condition: function() { return !document.body.classList; } },
71+
{ src: '../static/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
72+
{ src: '../static/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
73+
{ src: '../static/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
74+
{ src: '../static/plugin/zoom-js/zoom.js', async: true },
75+
{ src: '../static/plugin/notes/notes.js', async: true }
76+
]
77+
});
78+
79+
</script>
80+
81+
</body>
82+
</html>

Diff for: ex1/lecture.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Learn C The Hard Way
2+
=======
3+
4+
Exercise # Lecture
5+

Diff for: ex10/README.me

Whitespace-only changes.

Diff for: ex10/index.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
7+
<title>Learn C The Hard Way, Exercise 1 Lecture</title>
8+
9+
<meta name="description" content="Learn C The Hard Way, Exercise 1 Lecture">
10+
<meta name="author" content="Zed A. Shaw">
11+
12+
<meta name="apple-mobile-web-app-capable" content="yes" />
13+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14+
15+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16+
17+
<link rel="stylesheet" href="../static/css/reveal.css">
18+
<link rel="stylesheet" href="../static/css/theme/black.css" id="theme">
19+
20+
<!-- Code syntax highlighting -->
21+
<link rel="stylesheet" href="../static/lib/css/zenburn.css">
22+
23+
<!-- Printing and PDF exports -->
24+
<script>
25+
var link = document.createElement( 'link' );
26+
link.rel = 'stylesheet';
27+
link.type = 'text/css';
28+
link.href = window.location.search.match( /print-pdf/gi ) ? '../static/css/print/pdf.css' : '../static/css/print/paper.css';
29+
document.getElementsByTagName( 'head' )[0].appendChild( link );
30+
</script>
31+
32+
<!--[if lt IE 9]>
33+
<script src="../static/lib/js/html5shiv.js"></script>
34+
<![endif]-->
35+
</head>
36+
37+
<body>
38+
39+
<div class="reveal">
40+
41+
<!-- Any section element inside of this container is displayed as a slide -->
42+
<div class="slides">
43+
<section data-markdown="lecture.md"
44+
data-separator="^\n\n\n"
45+
data-separator-vertical="^\n\n"
46+
data-separator-notes="^Note:"
47+
data-charset="iso-8859-15">
48+
</section>
49+
</div>
50+
51+
</div>
52+
53+
<script src="../static/lib/js/head.min.js"></script>
54+
<script src="../static/js/reveal.js"></script>
55+
56+
<script>
57+
58+
// Full list of configuration options available at:
59+
// https://github.com/hakimel/reveal.js#configuration
60+
Reveal.initialize({
61+
controls: true,
62+
progress: true,
63+
history: true,
64+
center: true,
65+
66+
transition: 'slide', // none/fade/slide/convex/concave/zoom
67+
68+
// Optional reveal.js plugins
69+
dependencies: [
70+
{ src: '../static/lib/js/classList.js', condition: function() { return !document.body.classList; } },
71+
{ src: '../static/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
72+
{ src: '../static/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
73+
{ src: '../static/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
74+
{ src: '../static/plugin/zoom-js/zoom.js', async: true },
75+
{ src: '../static/plugin/notes/notes.js', async: true }
76+
]
77+
});
78+
79+
</script>
80+
81+
</body>
82+
</html>

Diff for: ex10/lecture.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Learn C The Hard Way
2+
=======
3+
4+
Exercise # Lecture
5+

Diff for: ex11/README.me

Whitespace-only changes.

Diff for: ex11/index.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
7+
<title>Learn C The Hard Way, Exercise 1 Lecture</title>
8+
9+
<meta name="description" content="Learn C The Hard Way, Exercise 1 Lecture">
10+
<meta name="author" content="Zed A. Shaw">
11+
12+
<meta name="apple-mobile-web-app-capable" content="yes" />
13+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14+
15+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16+
17+
<link rel="stylesheet" href="../static/css/reveal.css">
18+
<link rel="stylesheet" href="../static/css/theme/black.css" id="theme">
19+
20+
<!-- Code syntax highlighting -->
21+
<link rel="stylesheet" href="../static/lib/css/zenburn.css">
22+
23+
<!-- Printing and PDF exports -->
24+
<script>
25+
var link = document.createElement( 'link' );
26+
link.rel = 'stylesheet';
27+
link.type = 'text/css';
28+
link.href = window.location.search.match( /print-pdf/gi ) ? '../static/css/print/pdf.css' : '../static/css/print/paper.css';
29+
document.getElementsByTagName( 'head' )[0].appendChild( link );
30+
</script>
31+
32+
<!--[if lt IE 9]>
33+
<script src="../static/lib/js/html5shiv.js"></script>
34+
<![endif]-->
35+
</head>
36+
37+
<body>
38+
39+
<div class="reveal">
40+
41+
<!-- Any section element inside of this container is displayed as a slide -->
42+
<div class="slides">
43+
<section data-markdown="lecture.md"
44+
data-separator="^\n\n\n"
45+
data-separator-vertical="^\n\n"
46+
data-separator-notes="^Note:"
47+
data-charset="iso-8859-15">
48+
</section>
49+
</div>
50+
51+
</div>
52+
53+
<script src="../static/lib/js/head.min.js"></script>
54+
<script src="../static/js/reveal.js"></script>
55+
56+
<script>
57+
58+
// Full list of configuration options available at:
59+
// https://github.com/hakimel/reveal.js#configuration
60+
Reveal.initialize({
61+
controls: true,
62+
progress: true,
63+
history: true,
64+
center: true,
65+
66+
transition: 'slide', // none/fade/slide/convex/concave/zoom
67+
68+
// Optional reveal.js plugins
69+
dependencies: [
70+
{ src: '../static/lib/js/classList.js', condition: function() { return !document.body.classList; } },
71+
{ src: '../static/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
72+
{ src: '../static/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
73+
{ src: '../static/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
74+
{ src: '../static/plugin/zoom-js/zoom.js', async: true },
75+
{ src: '../static/plugin/notes/notes.js', async: true }
76+
]
77+
});
78+
79+
</script>
80+
81+
</body>
82+
</html>

Diff for: ex11/lecture.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Learn C The Hard Way
2+
=======
3+
4+
Exercise # Lecture
5+

Diff for: ex12/README.me

Whitespace-only changes.

Diff for: ex12/index.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
7+
<title>Learn C The Hard Way, Exercise 1 Lecture</title>
8+
9+
<meta name="description" content="Learn C The Hard Way, Exercise 1 Lecture">
10+
<meta name="author" content="Zed A. Shaw">
11+
12+
<meta name="apple-mobile-web-app-capable" content="yes" />
13+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14+
15+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16+
17+
<link rel="stylesheet" href="../static/css/reveal.css">
18+
<link rel="stylesheet" href="../static/css/theme/black.css" id="theme">
19+
20+
<!-- Code syntax highlighting -->
21+
<link rel="stylesheet" href="../static/lib/css/zenburn.css">
22+
23+
<!-- Printing and PDF exports -->
24+
<script>
25+
var link = document.createElement( 'link' );
26+
link.rel = 'stylesheet';
27+
link.type = 'text/css';
28+
link.href = window.location.search.match( /print-pdf/gi ) ? '../static/css/print/pdf.css' : '../static/css/print/paper.css';
29+
document.getElementsByTagName( 'head' )[0].appendChild( link );
30+
</script>
31+
32+
<!--[if lt IE 9]>
33+
<script src="../static/lib/js/html5shiv.js"></script>
34+
<![endif]-->
35+
</head>
36+
37+
<body>
38+
39+
<div class="reveal">
40+
41+
<!-- Any section element inside of this container is displayed as a slide -->
42+
<div class="slides">
43+
<section data-markdown="lecture.md"
44+
data-separator="^\n\n\n"
45+
data-separator-vertical="^\n\n"
46+
data-separator-notes="^Note:"
47+
data-charset="iso-8859-15">
48+
</section>
49+
</div>
50+
51+
</div>
52+
53+
<script src="../static/lib/js/head.min.js"></script>
54+
<script src="../static/js/reveal.js"></script>
55+
56+
<script>
57+
58+
// Full list of configuration options available at:
59+
// https://github.com/hakimel/reveal.js#configuration
60+
Reveal.initialize({
61+
controls: true,
62+
progress: true,
63+
history: true,
64+
center: true,
65+
66+
transition: 'slide', // none/fade/slide/convex/concave/zoom
67+
68+
// Optional reveal.js plugins
69+
dependencies: [
70+
{ src: '../static/lib/js/classList.js', condition: function() { return !document.body.classList; } },
71+
{ src: '../static/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
72+
{ src: '../static/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
73+
{ src: '../static/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
74+
{ src: '../static/plugin/zoom-js/zoom.js', async: true },
75+
{ src: '../static/plugin/notes/notes.js', async: true }
76+
]
77+
});
78+
79+
</script>
80+
81+
</body>
82+
</html>

Diff for: ex12/lecture.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Learn C The Hard Way
2+
=======
3+
4+
Exercise # Lecture
5+

Diff for: ex13/README.me

Whitespace-only changes.

0 commit comments

Comments
 (0)