A book about the command line for humans.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

316 lines
7.1 KiB

<!DOCTYPE html>
<html lang=en>
<head>
<meta charset="utf-8">
<title>get you a shell</title>
<link rel=stylesheet href="slides.css" />
<link rel="alternate" type="application/atom+xml" title="changes" href="//p1k3.com/userland-book/feed.xml" />
<script src="../js/jquery.js" type="text/javascript"></script>
</head>
<body>
<section>
<p style="font-size: 3em; margin-bottom: 0; text-align: center;">get you a shell</p>
<pre class=noborder style="margin-left: auto; margin-right: auto; width: 50%;">
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
</pre>
</section>
<section>
<p>Last fall, I forgot my laptop at work, but I wanted to write something.</p>
<p>And then I remembered that I had a Raspberry Pi sitting around.</p>
<p>So I set it up and started writing things on it.</p>
</section>
<section>
<p>And I got to thinking: This is just a stupid Linux computer without any graphics.</p>
<p>There&rsquo;s nothing here but the command line and some programs that do stuff to
plain text files.</p>
<p>And this is how I am happiest as a writer.</p>
<p>Not as a <em>programmer</em>, or a <em>clever unix dork</em>, but as a <em>writer</em>.</p>
</section>
<section>
<!-- exec -->
<pre><code>$ cowthink I should write a book about this.
___________________________________
( I should write a book about this. )
-----------------------------------
o ^__^
o (oo)\_______
(__)\ )\/\
||----w |
|| ||
</code></pre>
<!-- end -->
</section>
<section>
<p>So here&rsquo;s my thesis:</p>
<h1><a name=Unix-is-for-normal-humans href=#Unix-is-for-normal-humans></a> Unix is for normal humans.</h1>
<p>Wizards are cool and all, but most of us aren&rsquo;t wizards.</p>
<p>Most of us are just bumbling through life.</p>
<p>A lot of us like to make stuff anyway.</p>
<p>Unix is for that.</p>
</section>
<section>
<h1><a name=cool-story-bro href=#cool-story-bro></a> cool story bro</h1>
<h1><a name=wtf-is-unix href=#wtf-is-unix></a> wtf is unix?</h1>
</section>
<section>
<!-- jurassic park -->
<p style="text-align:center;"> <img src="../images/jp_unix.jpg"></p>
</section>
<section>
<p>&hellip;except what classical Unix really looks like is this:</p>
<p style="text-align:center;"> <img src="../images/blinking.gif" width="700"></p>
</section>
<section>
<p>And a lot of the time, modern Unix-like systems look like this:</p>
<p style="text-align:center;"> <img src="../images/debian.png"></p>
<p>&hellip;which isn&rsquo;t actually that unfamiliar, right?</p>
</section>
<section>
<ul>
<li><p>At SparkFun, we do a lot of stuff over serial.</p></li>
<li><p>Once upon a time, most of the interfaces to Really Serious Computers &ndash; the
ones at universities and in government &ndash; worked like debugging Arduino
code over a serial port.</p></li>
<li><p>The computer prints stuff, you type stuff to the computer, the computer
prints stuff. It&rsquo;s just text in a box.</p></li>
<li><p>Even once we got PCs in our houses, a lot of the interfaces shared this
heritage. Remember DOS? Ever have to fire up cmd.exe on Windows?</p></li>
</ul>
</section>
<section>
<p>In 2014, the Serious way you interact with Serious Computers &ndash; the ones that
most of the internet runs on &ndash; is still through a text terminal.</p>
<p>If you stop by my desk at work, my screen probably looks like this:</p>
<p style="text-align:center;"> <img src=fake_desktop.png width=1200px></p>
</section>
<section>
<p>But we&rsquo;re not here to talk about Serious Computers.</p>
<p>We&rsquo;re here to talk about how the command line is for normal human beings.</p>
</section>
<section>
<pre><code>YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING.
AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND
DOWN A GULLY.
&gt; GO EAST
YOU ARE INSIDE A BUILDING, A WELL HOUSE FOR A LARGE SPRING.
THERE ARE SOME KEYS ON THE GROUND HERE.
THERE IS A SHINY BRASS LAMP NEARBY.
THERE IS FOOD HERE.
THERE IS A BOTTLE OF WATER HERE.
</code></pre>
</section>
<section>
<p style="text-align:center;"> <img src="fuckit.jpeg" width=800></p>
<p>Now is where Brennen goes to the shell and fumbles around in front of an
audience.</p>
</section>
<section>
<p>So that&rsquo;s the shell. Want a shell?</p>
<p>I will give you a shell <em>right now</em>. Talk to me.</p>
<blockquote><p>https://p1k3.com/userland-book/</p>
<p>http://squiggle.city/</p></blockquote>
</section>
<script>
$(document).ready(function () {
// ☜ ☝ ☞ ☟ ☆ ✠ ✡ ✢ ✣ ✤ ✥ ✦ ✧ ✩ ✪
// get all the "slides", hide them
$sections = $('section');
$sections.hide();
var section_number = 0;
var $cur_section = $( $sections.get(section_number) );
$cur_section.toggle(); // show first slide
var transit = function (jump) {
$('button').hide();
$cur_section.hide();
section_number += jump;
if (section_number > ($sections.length - 1)) {
section_number = 0;
}
$cur_section = $( $sections.get(section_number) );
$cur_section.toggle({
duration: 200,
done: function () { $('button').show(); }
});
};
var $fwd_button = $('<button class=clicker-button>next</button>');
var $bwd_button = $('<button class=clicker-button>prev</button>');
$fwd_button.click(function (e) {
e.preventDefault();
transit(1);
});
$bwd_button.click(function (e) {
e.preventDefault();
transit(-1);
});
$(document).keydown(function(e) {
switch(e.which) {
case 8: // backspace
case 37: // left
$bwd_button.click();
break;
case 32: // spacebar
case 39: // right
$fwd_button.click();
break;
case 90:
toggleFullScreen();
break;
default:
return;
}
e.preventDefault();
});
$button_group = $('<div class=buttons/>');
$button_group.append($bwd_button);
$button_group.append($fwd_button);
$('body').append($button_group);
var toggleFullScreen = function () {
if (!document.fullscreenElement && // alternative standard method
!document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
};
});
</script>
</body>
</html>