<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
<title>Tyler Cipriani: Notes</title>
<link href="https://tylercipriani.com/tags/notes/"/>
<link href="https://tylercipriani.com/tags/notes/index.atom" rel="self" type="application/atom+xml"/>
<author>

<name>Tyler Cipriani</name>

</author>




<id>https://tylercipriani.com/tags/notes/</id>

<subtitle type="html">Tyler Cipriani</subtitle>
<generator uri="http://ikiwiki.info/">ikiwiki</generator>
<updated>2019-02-21T20:59:13Z</updated>
<entry>
	<title>Coreboot on the ThinkPad X220 with a Raspberry Pi</title>

	<id>https://tylercipriani.com/blog/2016/11/13/coreboot-on-the-thinkpad-x220-with-a-raspberry-pi/</id>

	<link href="https://tylercipriani.com/blog/2016/11/13/coreboot-on-the-thinkpad-x220-with-a-raspberry-pi/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		&lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike License&lt;/a&gt;
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="coreboot" />

	<category term="hardware" />

	<category term="notes" />


	<updated>2019-02-21T20:59:13Z</updated>
	<published>2016-11-13T00:00:00Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;My work laptop is terrible. About a year and a half ago, when I started my current gig, I received an Asus Zenbook that has been the bane of my existence ever since. First, it is impossible to work outside on this shiny monstrosity: all you see is your own dumb face squinting back at you, slightly obscured by very noticeable fingerprints from its mirror-like screen. Why are there fingerprints on the screen? Because, oh yeah, it’s a terrible touchscreen for no real reason. While the keyboard is serviceable, it is far from being a joy to use. There are no physical mouse buttons which, on a Linux install, means I’m forever flailing, trying to get middle-click paste to work (LPT: I setup an &lt;code&gt;xdotool&lt;/code&gt; shortcut to paste – doesn’t work in Emacs though…). The Asus has also succumb to the Apple-esque use of dongles to replace all necessary ports (like Ethernet, FFS).&lt;/p&gt;
&lt;p&gt;The final straw for this ridiculous machine was, for a reason that is beyond me, UEFI occasionally loses track of the boot drives and (although you can still &lt;em&gt;see&lt;/em&gt;(!) the &lt;code&gt;.efi&lt;/code&gt; file on disk via the UEFI interface) it won’t let you add it as a boot drive until you’ve sweated enough and/or there is a sufficiently powerful cosmic ray to flip the bits necessary to allow you to continue your life. This problem pretty much killed my productivity at my last offsite – as a result I decided to drop $500 and get a refurb ThinkPad X220 with more RAM and a bigger SSD than the ($1800) Zenbook.&lt;/p&gt;
&lt;section id=&quot;x-series-thinkpads-are-niiiiice&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;X-Series ThinkPads are niiiiice &lt;a href=&quot;https://tylercipriani.com/tags/notes/#x-series-thinkpads-are-niiiiice&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I have been using a ThinkPad X230t for the past 3 years, and, although the tablet is a little bulky, it has been everything I need in a work laptop – matte screen, physical buttons for all the things, an Ethernet port – it’s basically &lt;em&gt;not&lt;/em&gt; an unbelievably stupid laptop design (which is the bar now, evidently). The X220 I purchased for work is even better – it’s slightly smaller (since it’s not also a Wacom tablet), plus the X220 has a &lt;em&gt;nice&lt;/em&gt; keyboard – which – holy shit! – remember when anyone actually cared about laptop keyboards‽&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;i-am-become-hacker-destroyer-of-laptops&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;I am become hacker, destroyer of laptops &lt;a href=&quot;https://tylercipriani.com/tags/notes/#i-am-become-hacker-destroyer-of-laptops&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the other reasons for buying the X220 is that I’ve heard-tell (A.K.A, did a quick DDG search) that it supports Coreboot (although, sadly, not Libreboot, yet). The actual incantations for flashing the ROM on the X220 are spread over a few sources, with some sizable gaps in process.&lt;/p&gt;
&lt;p&gt;I spent the past 2 days pretty lost, flailing in the dark, booting my freshly flashed laptop to a momentary flicker of the green power-light, no fans, nothing, sighing, and compiling again. Now I stand victorious, Debian stable (8.6 as of November 2016) is booting from SeaBIOS.&lt;/p&gt;
&lt;p&gt;I kept a lot of notes on the process. Hopefully, these notes save someone some frustration, or make this process a tiny bit more approachable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Caveat Emptor&lt;/strong&gt; – I’m terrible at hardware stuff and writing, so follow these steps at your own peril!&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;things-you-need&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Things you need &lt;a href=&quot;https://tylercipriani.com/tags/notes/#things-you-need&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Lonovo ThinkPad X220&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.adafruit.com/products/954&quot;&gt;USB to TTY Serial Cable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.amazon.com/gp/product/B01CD5VC92/ref=oh_aui_detailpage_o00_s00?ie=UTF8&amp;amp;psc=1&quot;&gt;Raspberry Pi 3 Model B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.amazon.com/gp/product/B00HHH65T4/ref=oh_aui_detailpage_o01_s00?ie=UTF8&amp;amp;psc=1&quot;&gt;Pomona SOIC8 5250 Test Clip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;8x &lt;a href=&quot;https://www.adafruit.com/products/266&quot;&gt;Female Jumper Wire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;An HDMI monitor and external keyboard (possibly, you may be able to figure out how to do this without one)&lt;/li&gt;
&lt;li&gt;Another computer that will act as your Raspberry Pi terminal via the USB to TTY serial cable (is what I did anyway)&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;
&lt;img src=&quot;https://photos.tylercipriani.com/thumbs/13/0a884ef61214ae613c739a1460245b6da8c506/x220-spi-raspberry-pi-in-screen-1280.jpg&quot; alt=&quot;What the whole flashing setup looked like for me X230 -&amp;gt; USB-to-TTY -&amp;gt; Raspberry Pi -&amp;gt; Pomona Clip -&amp;gt; X220&quot; /&gt;&lt;figcaption&gt;&lt;a href=&quot;https://photos.tylercipriani.com/thumbs/13/0a884ef61214ae613c739a1460245b6da8c506/x220-spi-raspberry-pi-in-screen-original.jpg&quot;&gt;What the whole flashing setup looked like for me X230 -&amp;gt; USB-to-TTY -&amp;gt; Raspberry Pi -&amp;gt; Pomona Clip -&amp;gt; X220&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id=&quot;thinkpad-x220-disassembly&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;ThinkPad X220 Disassembly &lt;a href=&quot;https://tylercipriani.com/tags/notes/#thinkpad-x220-disassembly&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Remove Keyboard and palmrest (follow &lt;a href=&quot;https://support.lenovo.com/us/en/videos/pd022683&quot;&gt;Lonovo’s Guide&lt;/a&gt;)
&lt;ul&gt;
&lt;li&gt;Power down and remove battery&lt;/li&gt;
&lt;li&gt;I removed the keyboard and palm rest in 2 separate steps.&lt;/li&gt;
&lt;li&gt;Flip over and remove the 7 screws holding the keyboard and palmrest in place (they all have a picture of a square with 3 buttons [trackpad, I guess] near them).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WARNING&lt;/strong&gt; – 2 of these screws are different sizes than the other 5! The ones closest to the front-edge of the laptop are shorter, keep them seperate.&lt;/li&gt;
&lt;li&gt;Locations Diagram:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;Bottom&lt;/span&gt; of the ThinkPad -- &lt;span class=&quot;st&quot;&gt;&amp;#39;X&amp;#39;&lt;/span&gt; marks screws to be removed&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;+-----------------------------------------------------------+&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;ex&quot;&gt;xxxxxxxxxxxx&lt;/span&gt; Battery xxxxxxxxxxxxxxxxxxxxxxxxx          &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;ex&quot;&gt;xxxxxxxxxxxxx&lt;/span&gt; Area xxxxxxxxxxxxxxxxxxxxxxxxxxx          &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                                                           &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                                                           &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-7&quot; title=&quot;7&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                                                           &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-8&quot; title=&quot;8&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;              &lt;span class=&quot;ex&quot;&gt;+----X----------------+&lt;/span&gt;                      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-9&quot; title=&quot;9&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;              &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                     &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-10&quot; title=&quot;10&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;              &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;      &lt;span class=&quot;ex&quot;&gt;Memory&lt;/span&gt;         &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-11&quot; title=&quot;11&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;              &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;       &lt;span class=&quot;ex&quot;&gt;Door&lt;/span&gt;          &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-12&quot; title=&quot;12&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;   &lt;span class=&quot;ex&quot;&gt;X&lt;/span&gt;          &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;        &lt;span class=&quot;ex&quot;&gt;X&lt;/span&gt;            &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;             &lt;span class=&quot;ex&quot;&gt;X&lt;/span&gt;        &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-13&quot; title=&quot;13&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;      &lt;span class=&quot;ex&quot;&gt;X&lt;/span&gt;       +---------------------+                      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-14&quot; title=&quot;14&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                  &lt;span class=&quot;ex&quot;&gt;X&lt;/span&gt;               X                        &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-15&quot; title=&quot;15&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;+-----------------------------------------------------------+&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Flip it over, push the keyboard back, pull up the tabs near the palmrest.&lt;/li&gt;
&lt;li&gt;Rest the removed keyboard on the palmrest and remove ribbon cable from the motherboard.&lt;/li&gt;
&lt;li&gt;Flip palmrest up, and click the ribbon cable holding it in place, remove it.&lt;/li&gt;
&lt;li&gt;Lift tape on the left side of motherboard covering the chip you’re looking for.&lt;/li&gt;
&lt;li&gt;The BIOS chip you are looking for is &lt;strong&gt;right there&lt;/strong&gt; – the left-front of the motherboard if the screen is facing you.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;figure&gt;
&lt;img src=&quot;https://photos.tylercipriani.com/thumbs/de/8c2006845e8c04acda39da8c1ff39b6330175e/pomona-clip-on-x220-1280.jpg&quot; alt=&quot;Pomona 5250 attached to BIOS clip on ThinkPad X220&quot; /&gt;&lt;figcaption&gt;&lt;a href=&quot;https://photos.tylercipriani.com/thumbs/de/8c2006845e8c04acda39da8c1ff39b6330175e/pomona-clip-on-x220-original.jpg&quot;&gt;Pomona 5250 attached to BIOS clip on ThinkPad X220&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;section id=&quot;setup-your-pi-as-a-flasher&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Setup Your Pi as a Flasher &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup-your-pi-as-a-flasher&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now that you have access to the BIOS chip, you should setup your Raspberry Pi, and attach it to the Pomona 5250 clip via the SPI pins. Unfortunately, you do seem to need a monitor with HDMI to setup the Pi (someone better at Raspberry Pi things may know better).&lt;/p&gt;
&lt;p&gt;After the initial setup I was able to switch to using a serial cable interface.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;GIANT HUGE WARNING OF DOOM&lt;/strong&gt;: Hook your Pomona clip to your motherboard &lt;strong&gt;ONLY WITH THE BATTERY REMOVED, THE X220 UNPLUGGED, AAAANNDDD THE RASPBERRY PI OFF!!!!&lt;/strong&gt; You could probably fry this chip. I don’t actually know, but I was paranoid about it throughout the process. Power on the Raspberry Pi only when you’re certain the Pomona clip is secure.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Download the &lt;a href=&quot;https://www.raspberrypi.org/downloads/raspbian/&quot;&gt;Raspbian Lite&lt;/a&gt; torrent&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unzip the rasbian zip file and copy to an sd card&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;dd&lt;/span&gt; bs=4M if=rasbian-lite.img of=/dev/&lt;span class=&quot;op&quot;&gt;&amp;lt;&lt;/span&gt;partition of sd card&lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hook up your Raspberry Pi to a monitor and boot&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change password using &lt;code&gt;passwd&lt;/code&gt; (default user/pass: &lt;code&gt;pi&lt;/code&gt;/&lt;code&gt;raspberry&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup wifi by editing &lt;code&gt;/etc/wpa_supplicant/wpa_supplicant.conf&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;va&quot;&gt;network=&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;    &lt;span class=&quot;va&quot;&gt;ssid=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;YOUR_SSID&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;va&quot;&gt;psk=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;YOUR_PASSWORD&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;kw&quot;&gt;}&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit &lt;code&gt;/boot/config.txt&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;va&quot;&gt;dtparam=&lt;/span&gt;spi=&lt;span class=&quot;ex&quot;&gt;on&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;va&quot;&gt;enable_uart=&lt;/span&gt;1&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you can reboot and hook to a serial cable:&lt;/p&gt;
&lt;p&gt;Serial cable hookup diagram:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;Edge&lt;/span&gt; of pi (furthest from you)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt; &lt;span class=&quot;ex&quot;&gt;L&lt;/span&gt;    PWR       GND  TXD  RXD&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-3&quot; title=&quot;3&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt;      &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;         &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-4&quot; title=&quot;4&quot;&gt; &lt;span class=&quot;ex&quot;&gt;F&lt;/span&gt; +----v---------v----v----v-------------------------------------------------------------------------------+&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-5&quot; title=&quot;5&quot;&gt; &lt;span class=&quot;ex&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;ex&quot;&gt;x&lt;/span&gt;    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-6&quot; title=&quot;6&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;ex&quot;&gt;x&lt;/span&gt;    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-7&quot; title=&quot;7&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt; +--------------------------------------------------------------------------------------------------------+&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-8&quot; title=&quot;8&quot;&gt; &lt;span class=&quot;ex&quot;&gt;D&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-9&quot; title=&quot;9&quot;&gt; &lt;span class=&quot;ex&quot;&gt;G&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-10&quot; title=&quot;10&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-11&quot; title=&quot;11&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;Body&lt;/span&gt; of Pi (closest to you)&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install all the pre-req software working mostly from github wiki page &lt;a href=&quot;https://github.com/bibanon/Coreboot-ThinkPads/wiki/Hardware-Flashing-with-Raspberry-Pi&quot;&gt;Hardware Flashing with Raspberry Pi&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get update &lt;span class=&quot;kw&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get dist-upgrade &lt;span class=&quot;kw&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; reboot&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get update &lt;span class=&quot;kw&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get install libftdi1 libftdi-dev libusb-dev libpci-dev subversion&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get install build-essential pciutils usbutils libpci-dev libusb-dev libftdi1 libftdi-dev zlib1g-dev subversion&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;svn&lt;/span&gt; co svn://flashrom.org/flashrom/trunk flashrom&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; flashrom&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; make install&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Add the SPI kernal modules to &lt;code&gt;/etc/modules&lt;/code&gt; so they persist between boots.&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; modprobe spi_bcm2835&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; modprobe spidev&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Power down the Pi, Hook your Pi to your Pomona clip, then hook the Pomona clip to the motherboard, and power back up.&lt;/p&gt;
&lt;figure&gt;
&lt;img src=&quot;https://photos.tylercipriani.com/thumbs/1f/2067e7cd72a601f189c9cd60f17c3ecbac0039/pomona-clip-to-raspberry-pi-1280.jpg&quot; alt=&quot;Raspberry Pi 3 attached to ThinkPad X220 Pomona Clip&quot; /&gt;&lt;figcaption&gt;&lt;a href=&quot;https://photos.tylercipriani.com/thumbs/1f/2067e7cd72a601f189c9cd60f17c3ecbac0039/pomona-clip-to-raspberry-pi-original.jpg&quot;&gt;Raspberry Pi 3 attached to ThinkPad X220 Pomona Clip&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;X220 BIOS Chip pinout&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt; &lt;span class=&quot;ex&quot;&gt;Screen&lt;/span&gt; (furthest from you)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;             &lt;span class=&quot;ex&quot;&gt;__&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-3&quot; title=&quot;3&quot;&gt;  &lt;span class=&quot;ex&quot;&gt;MOSI&lt;/span&gt;  5 --&lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;--&lt;/span&gt; 4  GND&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-4&quot; title=&quot;4&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;CLK&lt;/span&gt;  6 --&lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;--&lt;/span&gt; 3  N/C&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-5&quot; title=&quot;5&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;N/C&lt;/span&gt;  7 --&lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;  &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;--&lt;/span&gt; 2  MISO&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-6&quot; title=&quot;6&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;VCC&lt;/span&gt;  8 --&lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;__&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;--&lt;/span&gt; 1  CS&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-7&quot; title=&quot;7&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-8&quot; title=&quot;8&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;Edge&lt;/span&gt; (closest to you)&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;PI Pinout&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WARNING!!!&lt;/strong&gt; This is the pinout for the &lt;strong&gt;RASPBERRY PI 3 MODEL B V1.2&lt;/strong&gt; it has 40 pins rather than 26&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;Edge&lt;/span&gt; of pi (furthest from you)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-2&quot; title=&quot;2&quot;&gt; &lt;span class=&quot;ex&quot;&gt;L&lt;/span&gt;                                                             CS&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-3&quot; title=&quot;3&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt;                                                             &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-4&quot; title=&quot;4&quot;&gt; &lt;span class=&quot;ex&quot;&gt;F&lt;/span&gt; +--------------------------------------------------------------------------------------------------------+&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-5&quot; title=&quot;5&quot;&gt; &lt;span class=&quot;ex&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;ex&quot;&gt;x&lt;/span&gt;    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-6&quot; title=&quot;6&quot;&gt;   &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;ex&quot;&gt;x&lt;/span&gt;    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    x    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-7&quot; title=&quot;7&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt; +--------------------------------------------^----^----^----^---------------------------------------^----+&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-8&quot; title=&quot;8&quot;&gt; &lt;span class=&quot;ex&quot;&gt;D&lt;/span&gt;                                              &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;    &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                                       &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-9&quot; title=&quot;9&quot;&gt; &lt;span class=&quot;ex&quot;&gt;G&lt;/span&gt;                                             3.3V  MOSI MISO &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt;                                      &lt;span class=&quot;ex&quot;&gt;GND&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-10&quot; title=&quot;10&quot;&gt; &lt;span class=&quot;ex&quot;&gt;E&lt;/span&gt;                                           (VCC)            &lt;span class=&quot;ex&quot;&gt;CLK&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-11&quot; title=&quot;11&quot;&gt;   &lt;span class=&quot;ex&quot;&gt;Body&lt;/span&gt; of Pi (closest to you)&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;See if &lt;code&gt;flashrom&lt;/code&gt; can detect your chipset (if you see &lt;code&gt;No EEPROM/flash device found.&lt;/code&gt; double check your connections and the pins for your pi – I realized I had my pins setup as if I were on the 26-GPIO pin Raspberry Pi rather than the 40-GPIO pin model 3)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: 2018-04-06&lt;/p&gt;
&lt;p&gt;One person emailed to indicate that the flashrom commands below required setting an &lt;code&gt;spispeed&lt;/code&gt;, i.e., &lt;code&gt;sudo flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;flashrom&lt;/span&gt; v0.9.9-r1954 on Linux 4.4.26-v7+ (armv7l)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;flashrom&lt;/span&gt; is free software, get the source code at https://flashrom.org&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-4&quot; title=&quot;4&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Calibrating&lt;/span&gt; delay loop... OK.&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Found&lt;/span&gt; Winbond flash chip &lt;span class=&quot;st&quot;&gt;&amp;quot;W25Q64.V&amp;quot;&lt;/span&gt; (8192 kB, SPI) &lt;span class=&quot;ex&quot;&gt;on&lt;/span&gt; linux_spi.&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;No&lt;/span&gt; operations were specified.&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Read your flashchip and verify that the md5sums match. If the md5sums of your reads don’t match repeat steps 9 and 10 until they do. If they never do, check your wiring with a multimeter (I had to do this at one point).&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb11&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb11-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r flash01.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb11-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r flash02.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb11-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ md5sum flash01.bin flash02.bin&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download coreboot on the Pi. Compile and use &lt;code&gt;ifdtool&lt;/code&gt; to extract all the needed bits to all the right places in the coreboot &lt;code&gt;blobs&lt;/code&gt; directory.&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb12&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; clone http://review.coreboot.org/coreboot.git ~/coreboot&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/coreboot&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; submodule update --init --recursive&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/coreboot/util/ifdtool&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; make install&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ifdtool&lt;/span&gt; -x ~/flash01.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; -p ~/coreboot/3rdparty/blobs/mainboard/lenovo/x220&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/coreboot/3rdparty/blobs/mainboard/lenovo/x220&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mv&lt;/span&gt; ~/flashregion_0_flashdescriptor.bin descriptor.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-12&quot; title=&quot;12&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mv&lt;/span&gt; ~/flashregion_2_intel_me.bin me.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mv&lt;/span&gt; ~/flashregion_3_gbe.bin gbe.bin&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: 2017-06-15&lt;/p&gt;
&lt;p&gt;Thomas Maulbeck emailed me and mentioned that &lt;code&gt;git submodule update --init --recursive&lt;/code&gt; did not populate the &lt;code&gt;3rdparty/blobs&lt;/code&gt; directory. It seems that &lt;code&gt;.gitmodules&lt;/code&gt; for coreboot has several urls that look in the parent directory for bare git repositories that don’t exist in the setup I’ve described in this post.&lt;/p&gt;
&lt;p&gt;Maulbeck was able to work around compilation errors by cloning &lt;code&gt;3rdparty/blobs&lt;/code&gt; directly:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb13&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb13-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/coreboot/3rdparty&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb13-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; clone http://review.coreboot.org/p/blobs.git&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If compilation fails with some mention of a missing &lt;code&gt;3rdparty/blobs/cpu/intel/model_206ax/microcode.bin&lt;/code&gt; this may be the root cause.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build coreboot on the Pi &lt;a href=&quot;https://www.coreboot.org/Build_HOWTO&quot;&gt;following the wiki instructions&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;configure via (&lt;strong&gt;note&lt;/strong&gt; – this is completely cargo-culted bullshit and YMMV…a lot) &lt;code&gt;make nconfig&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb14&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;general&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-2&quot; title=&quot;2&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt; [*] Compress ramstage with LZMA&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt; [*] Include coreboot .config file into the ROM image&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-4&quot; title=&quot;4&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt; [*] Allow use of binary-only repository&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;mainboard&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-6&quot; title=&quot;6&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  Mainboard vendor (Lenovo)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-7&quot; title=&quot;7&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  Mainboard model (ThinkPad X220)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-8&quot; title=&quot;8&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  ROM chip size (8192 KB (8 MB))&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-9&quot; title=&quot;9&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  (0x100000) &lt;span class=&quot;ex&quot;&gt;Size&lt;/span&gt; of CBFS filesystem in ROM&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;chipset&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-11&quot; title=&quot;11&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt; [*] Enable VMX for virtualization&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-12&quot; title=&quot;12&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  Include CPU microcode in CBFS (Generate from tree)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-13&quot; title=&quot;13&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;-&lt;/span&gt;  Flash ROM locking on S3 resume (Don&lt;span class=&quot;st&quot;&gt;&amp;#39;t lock ROM sections on S3 resume)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-14&quot; title=&quot;14&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Add Intel descriptor.bin file&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-15&quot; title=&quot;15&quot;&gt;&lt;span class=&quot;st&quot;&gt;      (3rdparty/blobs/mainboard/$(MAINBOARDDIR)/descriptor.bin) Path and filename of the descriptor.bin file&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-16&quot; title=&quot;16&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Add Intel ME/TXE firmware&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-17&quot; title=&quot;17&quot;&gt;&lt;span class=&quot;st&quot;&gt;      (3rdparty/blobs/mainboard/$(MAINBOARDDIR)/me.bin) Path to management engine firmware&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-18&quot; title=&quot;18&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Add gigabit ethernet firmware&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-19&quot; title=&quot;19&quot;&gt;&lt;span class=&quot;st&quot;&gt;      (3rdparty/blobs/mainboard/$(MAINBOARDDIR)/gbe.bin) Path to gigabit ethernet firmware&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-20&quot; title=&quot;20&quot;&gt;&lt;span class=&quot;st&quot;&gt;devices&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-21&quot; title=&quot;21&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Use native graphics initialization&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-22&quot; title=&quot;22&quot;&gt;&lt;span class=&quot;st&quot;&gt;display&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-23&quot; title=&quot;23&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - (nothing checked)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-24&quot; title=&quot;24&quot;&gt;&lt;span class=&quot;st&quot;&gt;generic drivers&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-25&quot; title=&quot;25&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Support Intel PCI-e WiFi adapters&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-26&quot; title=&quot;26&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] PS/2 keyboard init&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-27&quot; title=&quot;27&quot;&gt;&lt;span class=&quot;st&quot;&gt;console&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-28&quot; title=&quot;28&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Squelch AP CPUs from early console.&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-29&quot; title=&quot;29&quot;&gt;&lt;span class=&quot;st&quot;&gt;      [*] Show POST codes on the debug console&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-30&quot; title=&quot;30&quot;&gt;&lt;span class=&quot;st&quot;&gt;system tables&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-31&quot; title=&quot;31&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Generate SMBIOS tables&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-32&quot; title=&quot;32&quot;&gt;&lt;span class=&quot;st&quot;&gt;payload&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-33&quot; title=&quot;33&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - Add a payload (SeaBIOS)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-34&quot; title=&quot;34&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - SeaBIOS version (master)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-35&quot; title=&quot;35&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - (3000) PS/2 keyboard controller initialization timeout (milliseconds)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-36&quot; title=&quot;36&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Harware init during option ROM execution&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-37&quot; title=&quot;37&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Include generated option rom that implements legacy VGA BIOS compatibility&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-38&quot; title=&quot;38&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - [*] Use LZMA compression for payloads&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-39&quot; title=&quot;39&quot;&gt;&lt;span class=&quot;st&quot;&gt;debugging&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-40&quot; title=&quot;40&quot;&gt;&lt;span class=&quot;st&quot;&gt;    - (nothing checked)&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: 2018-04-06&lt;/p&gt;
&lt;p&gt;One person emailed to mention that &lt;code&gt;make nconfig&lt;/code&gt; may require a number of dependencies, see the &lt;a href=&quot;https://www.coreboot.org/Build_HOWTO#debian&quot;&gt;coreboot wiki&lt;/a&gt; for a complete list. As of this writing that list reads: &lt;code&gt;apt-get install git build-essential gnat flex bison libncurses5-dev wget zlib1g-dev&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Compile coreboot!&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb15&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt; crossgcc-i386 CPUS=4&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt; iasl&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EDIT – 2016-11-27&lt;/strong&gt; Andreas Sinninger pointed out I was missing the path to the Intel ME/TXE firmware – corrected.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;FINALLY! Flash your new &lt;code&gt;coreboot.rom&lt;/code&gt; to your rom chip:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb16&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r flash01.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -r flash02.bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ md5sum flash01.bin flash02.bin  &lt;span class=&quot;co&quot;&gt;# if these don&amp;#39;t match, stop, turn off the pi, fiddle with the Pomona clip, repeat this step&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;pi@raspberrypi&lt;/span&gt;:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 -w ~/coreboot/build/coreboot.rom&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If your laptop boots up to a SeaBIOS screen at this point: you win! If not, don’t despair, you can flash &lt;code&gt;flash01.bin&lt;/code&gt; to go back to your old BIOS, or, better yet, keep compiling until it works.&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;resources&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Resources &lt;a href=&quot;https://tylercipriani.com/tags/notes/#resources&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These are some general resources without which my X220 would be a pathetic pile of smashed up silicon by now.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.coreboot.org/Board:lenovo/x220&quot;&gt;ThinkPad X220 on the coreboot wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/bibanon/Coreboot-ThinkPads/wiki/Hardware-Flashing-with-Raspberry-Pi&quot;&gt;GitHub Coreboot-ThinkPad wiki, Hardware Flashing with Raspberry Pi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.noq2.net/corebooting-thinkpad-x230.html&quot;&gt;noq2 - Corebooting ThinkPad x230&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ericholzbach.net/blog/x230_coreboot/&quot;&gt;Eric Holzback - Coreboot on the Lonovo X230&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/11/13/coreboot-on-the-thinkpad-x220-with-a-raspberry-pi/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/11/13/coreboot-on-the-thinkpad-x220-with-a-raspberry-pi/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>GPG Security things</title>

	<id>https://tylercipriani.com/blog/2016/09/02/gpg-subkeys/</id>

	<link href="https://tylercipriani.com/blog/2016/09/02/gpg-subkeys/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="crypto" />

	<category term="notes" />

	<category term="pgp" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-09-02T23:29:05Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;revocation-cert&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Revocation Cert &lt;a href=&quot;https://tylercipriani.com/tags/notes/#revocation-cert&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Needed to revoke your key should the master signing/certifying key ever be compromised&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --output &lt;span class=&quot;dt&quot;&gt;\&amp;lt;&lt;/span&gt;tyler@tylercipriani.com&lt;span class=&quot;dt&quot;&gt;\&amp;gt;&lt;/span&gt;.gpg-revocation-certificate --gen-revoke tyler@tylercipriani.com&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;lpr&lt;/span&gt; &lt;span class=&quot;dt&quot;&gt;\&amp;lt;&lt;/span&gt;tyler@tylercipriani.com&lt;span class=&quot;dt&quot;&gt;\&amp;gt;&lt;/span&gt;.gpg-revocation-certificate&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;shred&lt;/span&gt; --remove &lt;span class=&quot;dt&quot;&gt;\&amp;lt;&lt;/span&gt;tyler@tylercipriani.com&lt;span class=&quot;dt&quot;&gt;\&amp;gt;&lt;/span&gt;.gpg-revocation-certificate&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;store printed revocation cert in file or safe-deposit box&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;key-backup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Key backup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#key-backup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jabberwocky.com/software/paperkey/&quot;&gt;Paperkey&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Download paperkey and its gpg signature&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;wget&lt;/span&gt; -c http://www.jabberwocky.com/software/paperkey/paperkey-1.3.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;wget&lt;/span&gt; -c http://www.jabberwocky.com/software/paperkey/paperkey-1.3.tar.gz.sig&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Get David Shaw&#39;s public key (0x99242560) from your keyserver of choice&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --search-keys &lt;span class=&quot;st&quot;&gt;&amp;#39;dshaw@jabberwocky.com&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Verify you have downloaded the right paper key and that the level of trust is sufficient for your purposes&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --verify Downloads/paperkey-1.3.tar.gz.sig paperkey-1.3.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;: Signature made Thu 03 Jan 2013 09:18:32 PM MST using RSA key ID FEA78A7AA1BC4FA4&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;: Good signature from &lt;span class=&quot;st&quot;&gt;&amp;quot;David M. Shaw &amp;lt;dshaw@jabberwocky.com&amp;gt;&amp;quot;&lt;/span&gt; [unknown]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;: WARNING: This key is not certified with a trusted signature!&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;:          There is no indication that the signature belongs to the owner.&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Primary&lt;/span&gt; key fingerprint: 7D92 FD31 3AB6 F373 4CC5  9CA1 DB69 8D71 9924 2560&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-7&quot; title=&quot;7&quot;&gt;     &lt;span class=&quot;ex&quot;&gt;Subkey&lt;/span&gt; fingerprint: A154 3829 812C 9EA9 87F1  4526 FEA7 8A7A A1BC 4FA4&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you have a good signature from davidExtract and install&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;tar&lt;/span&gt; xvzf paperkey-1.3.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;rm&lt;/span&gt; paperkey-1.3.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; paperkey-1.3&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;./configure&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; make install&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Print you secret key&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --export-secret-key tyler@tylercipriani.com &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;ex&quot;&gt;paperkey&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;lpr&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Store it in your file or safe-deposit-box&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;subkeys&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Subkeys &lt;a href=&quot;https://tylercipriani.com/tags/notes/#subkeys&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://alexcabal.com/creating-the-perfect-gpg-keypair/&quot;&gt;Good Resource&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By default, GnuPG creates a key for signing and an encryption subkey:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --list-keys tyler&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;pub&lt;/td&gt;
&lt;td&gt;rsa4096&lt;/td&gt;
&lt;td&gt;2014-02-19&lt;/td&gt;
&lt;td&gt;[SC]&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;6237D8D3ECC1AE918729296FF6DAD285018FAC02&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;uid&lt;/td&gt;
&lt;td&gt;[ultimate]&lt;/td&gt;
&lt;td&gt;Tyler&lt;/td&gt;
&lt;td&gt;Cipriani&lt;/td&gt;
&lt;td&gt;&amp;lt;tyler@tylercipriani.com&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;sub&lt;/td&gt;
&lt;td&gt;rsa4096&lt;/td&gt;
&lt;td&gt;2014-02-19&lt;/td&gt;
&lt;td&gt;[E]&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;You can add a new subkey with the command&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --edit-key tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;&lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; addkey&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And then you should see&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --list-keys tyler&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;pub&lt;/td&gt;
&lt;td&gt;rsa4096&lt;/td&gt;
&lt;td&gt;2014-02-19&lt;/td&gt;
&lt;td&gt;[SC]&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;6237D8D3ECC1AE918729296FF6DAD285018FAC02&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;uid&lt;/td&gt;
&lt;td&gt;[ultimate]&lt;/td&gt;
&lt;td&gt;Tyler&lt;/td&gt;
&lt;td&gt;Cipriani&lt;/td&gt;
&lt;td&gt;&amp;lt;tyler@tylercipriani.com&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;sub&lt;/td&gt;
&lt;td&gt;rsa4096&lt;/td&gt;
&lt;td&gt;2014-02-19&lt;/td&gt;
&lt;td&gt;[E]&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;sub&lt;/td&gt;
&lt;td&gt;rsa4096&lt;/td&gt;
&lt;td&gt;2016-09-02&lt;/td&gt;
&lt;td&gt;[S]&lt;/td&gt;
&lt;td&gt;[expires:&lt;/td&gt;
&lt;td&gt;2018-09-02]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;You can then remove your certification master key (make sure you&#39;ve gone through the &lt;a href=&quot;https://tylercipriani.com/tags/notes/#key-backup&quot;&gt;key backup&lt;/a&gt; process before you do this!)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Export all your secret subkeys&lt;/li&gt;
&lt;li&gt;Remove all your secret keys from your keyring&lt;/li&gt;
&lt;li&gt;Reimport only your subkeys&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --export-secret-subkeys tyler &lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; subkeys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --delete-secret-key tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --import subkeys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;shred&lt;/span&gt; --remove subkeys&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now &lt;code&gt;gpg --list-keys&lt;/code&gt; shows a &lt;code&gt;#&lt;/code&gt; next to &lt;code&gt;sec#&lt;/code&gt; next to my &lt;code&gt;[SC]&lt;/code&gt; key. This indicates that the key is no longer accessible.&lt;/p&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/09/02/gpg-subkeys/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/09/02/gpg-subkeys/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Bash Completion</title>

	<id>https://tylercipriani.com/blog/2016/08/30/bash-completion/</id>

	<link href="https://tylercipriani.com/blog/2016/08/30/bash-completion/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		&lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike License&lt;/a&gt;
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="bash" />

	<category term="computing" />

	<category term="notes" />

	<category term="shell" />


	<updated>2017-07-01T00:49:09Z</updated>
	<published>2016-08-30T05:01:47Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;links&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Links &lt;a href=&quot;https://tylercipriani.com/tags/notes/#links&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1&quot;&gt;Intro to bash completion&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;basics&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Basics &lt;a href=&quot;https://tylercipriani.com/tags/notes/#basics&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most Debian installed bash completions live under &lt;code&gt;/usr/share/bash_completion/completions&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot;&gt;&lt;pre class=&quot;sourceCode numberSource bash numberLines&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;# the first argument ($1) is the name of the command whose  arguments are being completed&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;co&quot;&gt;# the second argument ($2) is the word being completed,&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;co&quot;&gt;# and the third argument ($3) is the word preceding the word  being  completed  on the current command line&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;co&quot;&gt;# In the context of this function the following variables are defined:&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;co&quot;&gt;# COMP_LINE, COMP_POINT, COMP_KEY, and COMP_TYPE&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;co&quot;&gt;# as well as COMP_WORDS and COMP_CWORD&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;co&quot;&gt;#  It must put the possible completions in the COMPREPLY array&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;co&quot;&gt;# See bash(1) &amp;#39;^  Programmable Completion&amp;#39; for more information&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;_some_function()&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-10&quot; title=&quot;10&quot;&gt;  &lt;span class=&quot;bu&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;cur&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;cmd&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-11&quot; title=&quot;11&quot;&gt;  &lt;span class=&quot;va&quot;&gt;cur=${COMP_WORDS[$COMP_CWORD]}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-12&quot; title=&quot;12&quot;&gt;  &lt;span class=&quot;va&quot;&gt;cmd=(&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;${COMP_WORDS[@]}&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;kw&quot;&gt;}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-14&quot; title=&quot;14&quot;&gt;&lt;span class=&quot;bu&quot;&gt;complete&lt;/span&gt; -F _some_function command&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;complete-options&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&lt;code&gt;complete&lt;/code&gt; options &lt;a href=&quot;https://tylercipriani.com/tags/notes/#complete-options&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some complete options you want:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-o bashdefault&lt;/code&gt; - if no completions are found do the bash default thing&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-o default&lt;/code&gt; - readline completions if both the complete function and bash expansions fail&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-o nospace&lt;/code&gt; - don’t append a space at the end of matches (useful if you’re doing directory stuffs)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-S or -P&lt;/code&gt; - a prefix or suffix that is added at the end of a completion generated by the function passed to &lt;code&gt;complete -F&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;example&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Example &lt;a href=&quot;https://tylercipriani.com/tags/notes/#example&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode numberSource bash numberLines&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Many of the ideas presented in this script were stolen&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;co&quot;&gt;# in-part or wholesale from&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;co&quot;&gt;# &amp;lt;https://github.com/git/git/blob/master/contrib/completion/git-completion.bash&amp;gt;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;va&quot;&gt;__scap_subcommands=&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;__scap_get_subcommands()&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-6&quot; title=&quot;6&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;bu&quot;&gt; [&lt;/span&gt; &lt;span class=&quot;ot&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$__scap_subcommands&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;bu&quot;&gt; ]&lt;/span&gt;; &lt;span class=&quot;kw&quot;&gt;then&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-7&quot; title=&quot;7&quot;&gt;        &lt;span class=&quot;bu&quot;&gt;return&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-8&quot; title=&quot;8&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;fi&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-9&quot; title=&quot;9&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-10&quot; title=&quot;10&quot;&gt;    &lt;span class=&quot;va&quot;&gt;__scap_subcommands=$(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;scap&lt;/span&gt; --_autocomplete&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;kw&quot;&gt;}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-12&quot; title=&quot;12&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;_scap()&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-14&quot; title=&quot;14&quot;&gt;    &lt;span class=&quot;bu&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;cur&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;cmd=()&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;sub&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;rep&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-15&quot; title=&quot;15&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-16&quot; title=&quot;16&quot;&gt;    &lt;span class=&quot;va&quot;&gt;cur=${COMP_WORDS[$COMP_CWORD]}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-17&quot; title=&quot;17&quot;&gt;    &lt;span class=&quot;va&quot;&gt;cmd=(&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;${COMP_WORDS[@]}&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-18&quot; title=&quot;18&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-19&quot; title=&quot;19&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;((&lt;/span&gt; COMP_CWORD == 1 &lt;span class=&quot;kw&quot;&gt;))&lt;/span&gt;; &lt;span class=&quot;kw&quot;&gt;then&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-20&quot; title=&quot;20&quot;&gt;        &lt;span class=&quot;ex&quot;&gt;__scap_get_subcommands&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-21&quot; title=&quot;21&quot;&gt;        &lt;span class=&quot;va&quot;&gt;rep=$(&lt;/span&gt; &lt;span class=&quot;bu&quot;&gt;compgen&lt;/span&gt; -W &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$__scap_subcommands&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; -- &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$cur&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-22&quot; title=&quot;22&quot;&gt;        &lt;span class=&quot;va&quot;&gt;COMPREPLY=(&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;$rep&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-23&quot; title=&quot;23&quot;&gt;        &lt;span class=&quot;bu&quot;&gt;return&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-24&quot; title=&quot;24&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;fi&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-25&quot; title=&quot;25&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-26&quot; title=&quot;26&quot;&gt;    &lt;span class=&quot;co&quot;&gt;# limit the command to autocomplete to the first 3 words&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-27&quot; title=&quot;27&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;((&lt;/span&gt; COMP_CWORD &amp;gt;= 2 &lt;span class=&quot;kw&quot;&gt;))&lt;/span&gt;; &lt;span class=&quot;kw&quot;&gt;then&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-28&quot; title=&quot;28&quot;&gt;        &lt;span class=&quot;co&quot;&gt;# don&amp;#39;t complete any sub-subcommands, only options&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-29&quot; title=&quot;29&quot;&gt;        &lt;span class=&quot;kw&quot;&gt;if [[&lt;/span&gt; &lt;span class=&quot;ot&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$cur&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;${cur:0:1}&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;ot&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;-&amp;#39;&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt; ]]&lt;/span&gt;; &lt;span class=&quot;kw&quot;&gt;then&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-30&quot; title=&quot;30&quot;&gt;            &lt;span class=&quot;va&quot;&gt;COMPREPLY=()&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-31&quot; title=&quot;31&quot;&gt;            &lt;span class=&quot;bu&quot;&gt;return&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-32&quot; title=&quot;32&quot;&gt;        &lt;span class=&quot;kw&quot;&gt;fi&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-33&quot; title=&quot;33&quot;&gt;        &lt;span class=&quot;va&quot;&gt;cmd=(&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;${COMP_WORDS[@]:0:3}&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-34&quot; title=&quot;34&quot;&gt;    &lt;span class=&quot;kw&quot;&gt;fi&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-35&quot; title=&quot;35&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-36&quot; title=&quot;36&quot;&gt;    &lt;span class=&quot;co&quot;&gt;# replace the last word in the command with &amp;#39;--_autocomplete&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-37&quot; title=&quot;37&quot;&gt;    &lt;span class=&quot;va&quot;&gt;cmd[ $((&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;${#cmd[@]}&lt;/span&gt; - 1 &lt;span class=&quot;va&quot;&gt;)) ]=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;#39;--_autocomplete&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-38&quot; title=&quot;38&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-39&quot; title=&quot;39&quot;&gt;    &lt;span class=&quot;va&quot;&gt;rep=$(&lt;/span&gt; &lt;span class=&quot;bu&quot;&gt;compgen&lt;/span&gt; -W &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;${cmd[@]}&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; -- &lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$cur&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-40&quot; title=&quot;40&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-41&quot; title=&quot;41&quot;&gt;    &lt;span class=&quot;va&quot;&gt;COMPREPLY=(&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;$rep&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-42&quot; title=&quot;42&quot;&gt;&lt;span class=&quot;kw&quot;&gt;}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-43&quot; title=&quot;43&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-44&quot; title=&quot;44&quot;&gt;&lt;span class=&quot;co&quot;&gt;# By default append nospace except when completion comes from _scap&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-45&quot; title=&quot;45&quot;&gt;&lt;span class=&quot;bu&quot;&gt;complete&lt;/span&gt; -S&lt;span class=&quot;st&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt; -o bashdefault -o default -o nospace -F _scap scap&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/08/30/bash-completion/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/08/30/bash-completion/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>GNU Autotools</title>

	<id>https://tylercipriani.com/blog/2016/05/25/gnu-autotools/</id>

	<link href="https://tylercipriani.com/blog/2016/05/25/gnu-autotools/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="gnu" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-05-25T14:22:03Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;links&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Links &lt;a href=&quot;https://tylercipriani.com/tags/notes/#links&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install&quot;&gt;https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;configure.ac&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&lt;code&gt;configure.ac&lt;/code&gt; &lt;a href=&quot;https://tylercipriani.com/tags/notes/#configure.ac&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Written in m4sh (m4 + shell)&lt;/li&gt;
&lt;li&gt;Program initialization: &lt;code&gt;AC_INIT&lt;/code&gt; macro—needs name, version, maintainer&lt;/li&gt;
&lt;li&gt;Initialize automake: &lt;code&gt;AM_INIT_AUTOMAKE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Make sure that C-compiler exists: &lt;code&gt;AC_PROG_CC&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Build &lt;code&gt;Makefile&lt;/code&gt; from &lt;code&gt;Makefile.in&lt;/code&gt;, replaces &lt;code&gt;@PACKAGE_VERSION@&lt;/code&gt;-type variables: &lt;code&gt;AC_CONFIG_FILES([Makefile])&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output the script: &lt;code&gt;AC_OUTPUT&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot;&gt;&lt;pre class=&quot;sourceCode makefile&quot;&gt;&lt;code class=&quot;sourceCode makefile&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;AC_INIT([hello-world], [0.1], [tyler@tylercipriani.com])&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Initialize automake&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;AM_INIT_AUTOMAKE&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Ensure C-compiler exists&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-7&quot; title=&quot;7&quot;&gt;AC_PROG_CC&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-8&quot; title=&quot;8&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Specify what files are to be created&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-10&quot; title=&quot;10&quot;&gt;AC_CONFIG_FILES([Makefile])&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-11&quot; title=&quot;11&quot;&gt;AC_OUTPUT&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;makefile.am&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&lt;code&gt;Makefile.am&lt;/code&gt; &lt;a href=&quot;https://tylercipriani.com/tags/notes/#makefile.am&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;./configure&lt;/code&gt; script (created by &lt;code&gt;configure.ac&lt;/code&gt;), expects to find &lt;code&gt;Makefile.in&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Makefile.in&lt;/code&gt; is long and dumb (just like &lt;code&gt;./configure&lt;/code&gt;), so we make a &lt;code&gt;Makefile.am&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;automake&lt;/code&gt; generates &lt;code&gt;Makefile.in&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;foreign&lt;/code&gt; AUTOMAKE&lt;sub&gt;OPTIONS&lt;/sub&gt; tells that the layout is &quot;non standard&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode makefile&quot;&gt;&lt;code class=&quot;sourceCode makefile&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;dt&quot;&gt;AUTOMAKE_OPTIONS &lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt; foreign&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;dt&quot;&gt;bin_PROGRAMS &lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt; hello-world&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;dt&quot;&gt;hello-world_SOURCES &lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt; hello-world.c&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;put-it-all-together&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Put it all together: &lt;a href=&quot;https://tylercipriani.com/tags/notes/#put-it-all-together&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;create m4 environment: &lt;code&gt;aclocal&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;autoconf&lt;/code&gt; does: &lt;code&gt;configure.ac&lt;/code&gt; → &lt;code&gt;configure&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;automake --add-missing&lt;/code&gt; does: &lt;code&gt;Makefile.am&lt;/code&gt; → &lt;code&gt;Makefile.in&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;autoreconf --install&lt;/code&gt;: autoreconf runs autoconf, autoheader, aclocal, automake, libtoolize, and autopoint&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/gnu-autotools/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/gnu-autotools/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Ikiwiki things</title>

	<id>https://tylercipriani.com/blog/2016/05/25/ikiwiki/</id>

	<link href="https://tylercipriani.com/blog/2016/05/25/ikiwiki/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="ikiwiki" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-05-25T14:22:03Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;install&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Install &lt;a href=&quot;https://tylercipriani.com/tags/notes/#install&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Mostly it was pretty easy&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grabbed the &lt;a href=&quot;https://packages.debian.org/unstable/source/ikiwiki&quot;&gt;tar from debian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Followed install instructions from &lt;a href=&quot;https://ikiwiki.info/install/&quot;&gt;Ikiwiki&#39;s install page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;tar&lt;/span&gt; xvzf ikiwiki_3.20160121.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ikiwiki_3.20160121&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; PERL5LIB=&lt;span class=&quot;kw&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;bu&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt;`&lt;/span&gt; PERL_MM_USE_DEFAULT=1 perl -MCPAN -e &lt;span class=&quot;st&quot;&gt;&amp;#39;CPAN::Shell-&amp;gt;install(&amp;quot;Bundle::IkiWiki&amp;quot;)&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; PERL5LIB=&lt;span class=&quot;kw&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;bu&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt;`&lt;/span&gt; PERL_MM_USE_DEFAULT=1 perl -MCPAN -e &lt;span class=&quot;st&quot;&gt;&amp;#39;CPAN::Shell-&amp;gt;install(&amp;quot;Bundle::IkiWiki::Extras&amp;quot;)&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; make install&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;openid-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;OpenID Setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#openid-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;del&gt;Ikiwiki requires an OpenID setup&lt;/del&gt;.&lt;/p&gt;
&lt;p&gt;You can login to Ikiwiki with OpenID, and I think that&#39;s neat!&lt;/p&gt;
&lt;p&gt;Since OpenID is somewhat dead, I decided to setup a personal SimpleID.&lt;/p&gt;
&lt;p&gt;I put this all on the analytics server.&lt;/p&gt;
&lt;p&gt;First I had to create a DNS record for &lt;code&gt;openid.tylercipriani.com&lt;/code&gt; so letsencrypt would work.&lt;/p&gt;
&lt;p&gt;Then I made a new letsencrypt cert:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;/usr/local/src/letsencrypt/letsencrypt-auto&lt;/span&gt; certonly --standalone -d openid.tylercipriani.com&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I grabbed and installed openid&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; /usr/local/src&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;curl&lt;/span&gt; -sLO http://downloads.sourceforge.net/simpleid/simpleid-1.0.1.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;tar&lt;/span&gt; xvzf simpleid-1.0.1.tar.gz&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; /srv/www/openid.tylercipriani.com&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mv&lt;/span&gt; simpleid/&lt;span class=&quot;dt&quot;&gt;{cache,identities,store,www}&lt;/span&gt; /srv/www/openid.tylercipriani.com&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mv&lt;/span&gt; /srv/www/openid.tylercipriani.com/&lt;span class=&quot;dt&quot;&gt;{config.php.dist,config.php}&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Edited the &lt;code&gt;config.php&lt;/code&gt; file, changed root webserver and the pretty url thing&lt;/p&gt;
&lt;p&gt;I also made a virtualserver: openid.tylercipriani.com&lt;/p&gt;
&lt;p&gt;Identity file: &lt;code&gt;thcipriani.identity&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot;&gt;&lt;pre class=&quot;sourceCode ini&quot;&gt;&lt;code class=&quot;sourceCode ini&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;dt&quot;&gt;identity&lt;/span&gt;&lt;span class=&quot;ot&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;https://tylercipriani.com/&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;dt&quot;&gt;password&lt;/span&gt;&lt;span class=&quot;ot&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;blah:sha1:salt&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;dt&quot;&gt;administrator&lt;/span&gt;&lt;span class=&quot;ot&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;dv&quot;&gt;1&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;kw&quot;&gt;[user_info]&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;dt&quot;&gt;...&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;kw&quot;&gt;[sreg]&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;dt&quot;&gt;...&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;blog-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Blog setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#blog-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The things that I didn&#39;t understand about Ikiwiki:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;htmlscrubber removes all your scripts&lt;/li&gt;
&lt;li&gt;Some changes to the setup file (like &lt;code&gt;git_wrapper&lt;/code&gt; updates) require you to run &lt;code&gt;ikiwiki --changesetup [setupfile]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I am running a staging wiki on my laptop, a wiki on my webserver, and then pushing the compiled files to s3: WAT‽&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/ikiwiki/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/ikiwiki/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Mutt</title>

	<id>https://tylercipriani.com/blog/2016/05/25/mutt/</id>

	<link href="https://tylercipriani.com/blog/2016/05/25/mutt/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="mutt" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-05-25T14:22:03Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;contacts&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Contacts &lt;a href=&quot;https://tylercipriani.com/tags/notes/#contacts&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Install goobook:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; pip2 install -U goobook&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I ran into some problems in arch, had to upgrade/reinstall a few deps:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;ﾉ^ヮ^&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;ﾉ&lt;span class=&quot;ex&quot;&gt;*&lt;/span&gt;:・ﾟ✧ sudo pip2 install -U pyasn1&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;ﾉ^ヮ^&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;ﾉ&lt;span class=&quot;ex&quot;&gt;*&lt;/span&gt;:・ﾟ✧ sudo pip2 install -U cryptography&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;goobook then needs to authenticate with gmail:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;goobook&lt;/span&gt; authenticate&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you go through the oauth song and dance you should be able to run a &lt;code&gt;query&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;ﾉ^ヮ^&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;ﾉ&lt;span class=&quot;ex&quot;&gt;*&lt;/span&gt;:・ﾟ✧ goobook query tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;thcipriani@gmail.com&lt;/span&gt;    Tyler Cipriani  other groups: &lt;span class=&quot;st&quot;&gt;&amp;quot;System Group: Friends&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;From there, just need to add a bit of magic to the &lt;code&gt;~/.muttrc&lt;/code&gt; file&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;kw&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;query_command=&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;goobook query %s&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;macro&lt;/span&gt; index,pager a \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;st&quot;&gt;&amp;quot;&amp;lt;pipe-message&amp;gt;goobook add&amp;lt;return&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;add sender to google contacts&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;bu&quot;&gt;bind&lt;/span&gt; editor &lt;span class=&quot;op&quot;&gt;&amp;lt;&lt;/span&gt;Tab&lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; complete-query&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;viewing-urls&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Viewing URLs &lt;a href=&quot;https://tylercipriani.com/tags/notes/#viewing-urls&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Install urlview: ncurses program parses urls out of text.&lt;/p&gt;
&lt;p&gt;Create a &lt;code&gt;$HOME/urlview&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;COMMAND&lt;/span&gt; xdg-open %s &lt;span class=&quot;kw&quot;&gt;&amp;amp;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Bind &lt;code&gt;\,u&lt;/code&gt; in the editor:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;macro&lt;/span&gt; pager ,u &lt;span class=&quot;st&quot;&gt;&amp;quot;|urlview&amp;lt;enter&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;call urlview to open links&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;searching-mail&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Searching Mail &lt;a href=&quot;https://tylercipriani.com/tags/notes/#searching-mail&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Searching works really well via &lt;code&gt;notmuch&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Afer install, setup via&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;notmuch&lt;/span&gt; setup&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After setup, it&#39;s just a matter of calling&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;notmuch&lt;/span&gt; new&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;to index the things&lt;/p&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/mutt/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/05/25/mutt/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Bitlebee/IRC info</title>

	<id>https://tylercipriani.com/blog/2016/04/26/bitlbee/</id>

	<link href="https://tylercipriani.com/blog/2016/04/26/bitlbee/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="bitlebee" />

	<category term="computing" />

	<category term="irc" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-04-26T14:50:54Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;helpful-posts&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Helpful Posts &lt;a href=&quot;https://tylercipriani.com/tags/notes/#helpful-posts&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://pthree.org/2011/03/08/bitlbee-and-otr/&quot;&gt;- pthree.org post&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Datko&#39;s book has this same kinda stuff.&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;restart-bitlbee-without-restarting-weechat&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Restart bitlbee without restarting Weechat &lt;a href=&quot;https://tylercipriani.com/tags/notes/#restart-bitlbee-without-restarting-weechat&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; service bitlbee stop&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;/disconnect&lt;/span&gt; localhost&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; service bitlbee start&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;/connect&lt;/span&gt; localhost/6667&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;/msg&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;bitlbee&lt;/span&gt; identify [password]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;setup-otr&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Setup OTR &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup-otr&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First had to install the &lt;code&gt;bitlbee-plugin-otr&lt;/code&gt; plugin:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get install bitlbee-plugin-otr&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In the &lt;code&gt;&amp;amp;bitlebee&lt;/code&gt; window&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;account list
&amp;gt; @root 0 (gtalk): jabber, thcipriani@gmail.com (connected)
&amp;gt; @root 1 (twitter): twitter, thcipriani (connected)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Will return a list of accounts that are currently setup in bitlbee.&lt;/p&gt;
&lt;p&gt;To generate a key for the 0th account—gmail in my case:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;otr keygen 0
&lt;/code&gt;&lt;/pre&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/26/bitlbee/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/26/bitlbee/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>VHS to MP4 on Linux</title>

	<id>https://tylercipriani.com/blog/2016/04/26/vcr-recording-linux/</id>

	<link href="https://tylercipriani.com/blog/2016/04/26/vcr-recording-linux/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="notes" />

	<category term="video" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-04-26T14:50:54Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;I recently ordered a set of videos that I remember from a few years ago that did not make the jump to DVD, unfortunately.&lt;/p&gt;
&lt;p&gt;I &lt;em&gt;do&lt;/em&gt; have a VCR; however, I never have it hooked up because…why would I?&lt;/p&gt;
&lt;p&gt;The solution here: convert my VHS tapes into H.264/MP3 mp4-contained files.&lt;/p&gt;
&lt;p&gt;Now the question is: how?&lt;/p&gt;
&lt;section id=&quot;hardware&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Hardware &lt;a href=&quot;https://tylercipriani.com/tags/notes/#hardware&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I managed to grab an &lt;a href=&quot;http://www.amazon.com/WZYuan-Easycap-Adapter-Capture-Support/dp/B01D65M1CK?ie=UTF8&amp;amp;psc=1&amp;amp;redirect=true&amp;amp;ref_=oh_aui_detailpage_o00_s00&quot;&gt;EasyCap D60&lt;/a&gt; Recording device from Amazon.&lt;/p&gt;
&lt;p&gt;This device is supported inside the linux kernel (from version 3.18 forward…maybe?)&lt;/p&gt;
&lt;p&gt;Once I plugged in this device, it was working:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot; data-export=&quot;both&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;lsusb&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This bad boy:&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr class=&quot;odd&quot;&gt;
&lt;td&gt;Bus&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Device&lt;/td&gt;
&lt;td&gt;016:&lt;/td&gt;
&lt;td&gt;ID&lt;/td&gt;
&lt;td&gt;1b71:3002&lt;/td&gt;
&lt;td&gt;Fushicai&lt;/td&gt;
&lt;td&gt;USBTV007&lt;/td&gt;
&lt;td&gt;Video&lt;/td&gt;
&lt;td&gt;Grabber&lt;/td&gt;
&lt;td&gt;[EasyCAP]&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I checked out:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot; data-export=&quot;both&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ls&lt;/span&gt; /dev &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;grep&lt;/span&gt; -i video&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And I noticed a &lt;strong&gt;new&lt;/strong&gt; video device &lt;code&gt;video1&lt;/code&gt;. Easy.&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;capture-software&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Capture Software &lt;a href=&quot;https://tylercipriani.com/tags/notes/#capture-software&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I used VLC to caputre raw input.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Media&lt;/code&gt; → &lt;code&gt;Open Caputre Device&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Video Device Name&lt;/code&gt; → &lt;code&gt;/dev/video1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Audio Device Name&lt;/code&gt; → &lt;code&gt;hw:2,0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Play&lt;/code&gt; pulldown menu → &lt;code&gt;Convert&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Dump Raw Input&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Destination File&lt;/code&gt; → &lt;code&gt;/home/tyler/Videos&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Start&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Hit play on the VCR&lt;/li&gt;
&lt;li&gt;Hit the Rec. button in VLC&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The auto-named avi file in &lt;code&gt;~/Videos&lt;/code&gt; was &lt;strong&gt;FUCKING HUGE&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot; data-export=&quot;both&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ls&lt;/span&gt; -lh ~/Videos &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;grep&lt;/span&gt; -i avi&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;conversion&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Conversion &lt;a href=&quot;https://tylercipriani.com/tags/notes/#conversion&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I found a &lt;a href=&quot;https://www.guyrutenberg.com/2010/09/10/capturing-video-and-converting-to-h-264-using-ffmpeg/&quot;&gt;blog&lt;/a&gt; where a person does this. I have a vauge memory about doing this at UpSync, so I&#39;ll give it a shot: 2-pass mp4 conversion.&lt;/p&gt;
&lt;p&gt;Let&#39;s see what happens!&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ffmpeg&lt;/span&gt; -i ~/Videos/vlc-record-2016-04-22-14h47m57s-Streaming-.avi -c:v libx264 -pix_fmt yuv420p -preset slow -threads 0 -b:v 825k -strict -2 -c:a aac -b:a 96k -pass 1 -f mp4 -y /dev/null&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ffmpeg&lt;/span&gt; -i ~/Videos/vlc-record-2016-04-22-14h47m57s-Streaming-.avi -c:v libx264 -pix_fmt yuv420p \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt;  -preset slow -threads 0 -b:v 825k -strict -2 -c:a aac -b:a 96k -pass 2 ~/Videos/out.mp4&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The settings above created an mp4 that could be played via x264 on a RaspberryPi 3.&lt;/p&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/26/vcr-recording-linux/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/26/vcr-recording-linux/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Beaglebone Black Setup on Debian 8</title>

	<id>https://tylercipriani.com/blog/2016/04/01/beaglebone/</id>

	<link href="https://tylercipriani.com/blog/2016/04/01/beaglebone/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="notes" />

	<category term="soc" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-04-01T21:01:25Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;flash-emmc-with-latest-debian-image&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Flash eMMC with latest Debian image &lt;a href=&quot;https://tylercipriani.com/tags/notes/#flash-emmc-with-latest-debian-image&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Download Debian image [whatever].img.xz
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://beagleboard.org/latest-images&quot;&gt;http://beagleboard.org/latest-images&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;unxz&lt;/span&gt; bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Insert microSD card and make sure that it is unmounted
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lsblk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fdisk -l&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the img to the microSD card&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; dd bs=4 if=bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img of=/dev/mmcblk0 conv=fsync&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This step will take a lot of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mount the microSD card and make sure it flashes to the beaglebone:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; mount /dev/mmcblk0p1 /mnt/sd-card&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;vim&lt;/span&gt; /mnt/sd-card/boot/uEnv.txt&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Uncomment the line:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;va&quot;&gt;cmdline=&lt;/span&gt;init=&lt;span class=&quot;ex&quot;&gt;/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Hookup the &lt;a href=&quot;https://www.adafruit.com/products/954&quot;&gt;USB-to-serial cable&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Connect &lt;strong&gt;Black Wire&lt;/strong&gt; to &lt;strong&gt;Pin 1&lt;/strong&gt; (closest to 5v barrel)&lt;/li&gt;
&lt;li&gt;Connect &lt;strong&gt;Green Wire&lt;/strong&gt; to &lt;strong&gt;Pin 4&lt;/strong&gt; (2 pins from pin 1)&lt;/li&gt;
&lt;li&gt;Connect &lt;strong&gt;White Wire&lt;/strong&gt; to &lt;strong&gt;Pin 5&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Connect to USB, check output of &lt;code&gt;dmesg&lt;/code&gt; for which &lt;code&gt;/dev/&lt;/code&gt; the serial connection is on&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to serial connection via screen&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;screen&lt;/span&gt; /dev/ttyUSB0 115200&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;put sdcard in BBB and power up, hold the S2 button, power up&lt;/li&gt;
&lt;li&gt;Wait, the status lights will flash in a cylon pattern, you can watch the eMMC flash progress via &lt;code&gt;screen&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All User LEDs should be solid on completion&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More info is available on the &lt;a href=&quot;http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#FAQ&quot;&gt;BeagleBoneBlack Wiki&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;initial-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Initial setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#initial-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;connect-over-ssh&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Connect over SSH &lt;a href=&quot;https://tylercipriani.com/tags/notes/#connect-over-ssh&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To connect via ssh: plugin beaglebone to computer via SSH&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ssh&lt;/span&gt; -l root 192.168.7.2&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;wifi-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Wifi Setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#wifi-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Plugin the &lt;a href=&quot;https://www.adafruit.com/products/814&quot;&gt;wifi adapter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Reboot (unplug it and plug it back in)&lt;/li&gt;
&lt;li&gt;Generate your pre-shared key using &lt;code&gt;wpa_passphrase&lt;/code&gt; (see &lt;a href=&quot;https://wiki.debian.org/WiFi/HowToUse#WPA-PSK_and_WPA2-PSK&quot;&gt;Debian Wiki&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;vim &lt;code&gt;/etc/network/interfaces&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;/etc/network/interfaces&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;auto&lt;/span&gt; wlan0&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;iface&lt;/span&gt; wlan0 inet dhcp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;wpa-ssid&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;network-name&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/network/interfaces-4&quot; title=&quot;4&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;wpa-psk&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;network-password&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ifdown wlan0; ifup wlan0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;ip -o addr show&lt;/code&gt; to confirm that you have an ip address&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id=&quot;update-debian&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Update debian &lt;a href=&quot;https://tylercipriani.com/tags/notes/#update-debian&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use the &lt;a href=&quot;https://debian-handbook.info/browse/stable/sect.automatic-upgrades.html&quot;&gt;Debian Upgrade Script&lt;/a&gt; to update debian:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;~/bin/upgrade-debian&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;co&quot;&gt;# Debian auto-upgrade script&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;co&quot;&gt;# https://debian-handbook.info/browse/stable/sect.automatic-upgrades.html&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-4&quot; title=&quot;4&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;co&quot;&gt;# kill all cached creds&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; -k&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-7&quot; title=&quot;7&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;co&quot;&gt;# ask for new creds&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; -v&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-10&quot; title=&quot;10&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;bu&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;DEBIAN_FRONTEND=&lt;/span&gt;noninteractive&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-12&quot; title=&quot;12&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get update&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;~/bin/upgrade-debian-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;yes&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get -y -o Dpkg::Options::=&lt;span class=&quot;st&quot;&gt;&amp;quot;--force-confdef&amp;quot;&lt;/span&gt; -o Dpkg::Options::=&lt;span class=&quot;st&quot;&gt;&amp;quot;--force-confold&amp;quot;&lt;/span&gt; dist-upgrade&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;basic-security&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Basic security &lt;a href=&quot;https://tylercipriani.com/tags/notes/#basic-security&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;make-a-root-password&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Make a root password &lt;a href=&quot;https://tylercipriani.com/tags/notes/#make-a-root-password&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;code&gt;pwgen&lt;/code&gt;: &lt;code&gt;sudo apt-get install pwgen&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Generate a root password: &lt;code&gt;pwgen -Bsy 16 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Store that password in your password store—you&#39;ll never remember it&lt;/li&gt;
&lt;li&gt;Login to beaglebone via ssh, run &lt;code&gt;passwd&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;add-a-privileged-non-root-user&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Add a privileged non-root user &lt;a href=&quot;https://tylercipriani.com/tags/notes/#add-a-privileged-non-root-user&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generate a non-privileged user password: &lt;code&gt;pwgen -Bsy 16 1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Save password in password store&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the user&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; groupadd sudo-user&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; groupadd ssh-user&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;useradd&lt;/span&gt; tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; /home/tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; /home/tyler/.ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;touch&lt;/span&gt; /home/tyler/.ssh/authorized_keys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chown&lt;/span&gt; -R tyler:tyler /home/tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chmod&lt;/span&gt; 700 /home/tyler/.ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;fu&quot;&gt;chmod&lt;/span&gt; 600 /home/tyler/.ssh/authorized_keys&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; -a -G sudo-user tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; -a -G ssh-user tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-12&quot; title=&quot;12&quot;&gt;&lt;span class=&quot;ex&quot;&gt;usermod&lt;/span&gt; --shell /bin/bash tyler&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-13&quot; title=&quot;13&quot;&gt;&lt;span class=&quot;fu&quot;&gt;passwd&lt;/span&gt; tyler&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;give that user sudo privileges
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;EDITOR=vim visudo -f /etc/sudoers.d/sudo-user&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add the line: &lt;code&gt;%sudo-user ALL=(ALL) NOPASSWD:ALL&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add your laptop&#39;s key to user&#39;s &lt;code&gt;authorized_keys&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;co&quot;&gt;# This should happen from your local machine: laptop/desktop/whatever&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;cat&lt;/span&gt; ~/.ssh/id_rsa.pub &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;ssh&lt;/span&gt; -l tyler 192.168.7.2 &lt;span class=&quot;st&quot;&gt;&amp;#39;mkdir -p .ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;remove-demo-user&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Remove demo user &lt;a href=&quot;https://tylercipriani.com/tags/notes/#remove-demo-user&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;userdel -fr debian&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;lockdown-ssh&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Lockdown ssh &lt;a href=&quot;https://tylercipriani.com/tags/notes/#lockdown-ssh&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Generate better hostkeys&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; /etc/ssh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;rm&lt;/span&gt; ssh_host_*key*&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ssh-keygen&lt;/span&gt; -t rsa -b 4096 -f ssh_host_rsa_key &lt;span class=&quot;op&quot;&gt;&amp;lt;&lt;/span&gt; /dev/null&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modfiy &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; to make it like below:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;/etc/ssh/sshd_config&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Ciphers&lt;/span&gt; aes256-ctr,aes192-ctr,aes128-ctr&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;KexAlgorithms&lt;/span&gt; diffie-hellman-group-exchange-sha256&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;MACs&lt;/span&gt; hmac-sha2-512,hmac-sha2-256,hmac-ripemd160&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Protocol&lt;/span&gt; 2&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;HostKey&lt;/span&gt; /etc/ssh/ssh_host_rsa_key&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PubkeyAuthentication&lt;/span&gt; yes&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PermitRootLogin&lt;/span&gt; no&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;ex&quot;&gt;PasswordAuthentication&lt;/span&gt; no&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;/etc/ssh/sshd_config-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;ex&quot;&gt;AllowGroups&lt;/span&gt; ssh-user&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Restart SSH &lt;code&gt;service ssh restart&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open a new terminal window and make sure you can still login (you may need to delete and reaccept hostkeys)&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;fun-stuff&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Fun Stuff &lt;a href=&quot;https://tylercipriani.com/tags/notes/#fun-stuff&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Change ssh banner:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get install figlet&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;$1 !~ /default/&amp;#39;&lt;/span&gt; /etc/issue.net &lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; ~/issue.net &lt;span class=&quot;kw&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; mv ~/issue.net /etc/issue.net&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; sh -c &lt;span class=&quot;st&quot;&gt;&amp;#39;figlet BeagleBone &amp;gt;&amp;gt; /etc/issue.net&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;BeagleBone pin-out
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://stuffwemade.net/post/beaglebone-pinout&quot;&gt;http://stuffwemade.net/post/beaglebone-pinout&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;things-to-remember&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Things to remember &lt;a href=&quot;https://tylercipriani.com/tags/notes/#things-to-remember&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;thank god for 1wire temp sensor blog posts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://interactingobjects.com/ds18b20-temperature-sensor-on-a-beaglebone-black-running-ubuntu/&quot;&gt;http://interactingobjects.com/ds18b20-temperature-sensor-on-a-beaglebone-black-running-ubuntu/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://klaus.ede.hih.au.dk/index.php/BBB_and_OneWire&quot;&gt;http://klaus.ede.hih.au.dk/index.php/BBB_and_OneWire&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;iwconfig when can&#39;t find wlan0 interface (could be wlan1)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/01/beaglebone/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/01/beaglebone/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>neovim on debian</title>

	<id>https://tylercipriani.com/blog/2016/04/01/neovim/</id>

	<link href="https://tylercipriani.com/blog/2016/04/01/neovim/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="notes" />

	<category term="vim" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2016-04-01T21:01:25Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;installing-neovim&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;https://github.com/neovim/neovim/wiki/Building-Neovim&quot;&gt;Installing Neovim&lt;/a&gt; &lt;a href=&quot;https://tylercipriani.com/tags/notes/#installing-neovim&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/neovim/neovim/wiki/Building-Neovim#ubuntu--debian&quot;&gt;Install Prerequisites&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; apt-get -f install libtool libtool-bin autoconf automake cmake g++ pkg-config unzip libmsgpack-dev libuv-dev libluajit-5.1-dev&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clone repo&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; clone https://github.com/neovim/neovim.git&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-source&quot;&gt;Make install&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; neovim&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;make&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;sudo&lt;/span&gt; make install&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id=&quot;setup-neovim&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;https://neovim.io/doc/user/nvim_from_vim.html&quot;&gt;Setup Neovim&lt;/a&gt; &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup-neovim&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ln&lt;/span&gt; -s ~/.vim &lt;span class=&quot;va&quot;&gt;$XDG_CONFIG_HOME&lt;/span&gt;/nvim&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;ln&lt;/span&gt; -s ~/.vimrc &lt;span class=&quot;va&quot;&gt;$XDG_CONFIG_HOME&lt;/span&gt;/nvim/init.vim&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/01/neovim/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/04/01/neovim/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>GPG Things</title>

	<id>https://tylercipriani.com/blog/2015/12/02/gpg/</id>

	<link href="https://tylercipriani.com/blog/2015/12/02/gpg/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="crypto" />

	<category term="notes" />

	<category term="pgp" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2015-12-03T00:27:40Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;get-your-fingerprint&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Get your fingerprint: &lt;a href=&quot;https://tylercipriani.com/tags/notes/#get-your-fingerprint&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --list-secret-keys --fingerprint&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;get-someone-elses-key&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Get someone elses key &lt;a href=&quot;https://tylercipriani.com/tags/notes/#get-someone-elses-key&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;using-email&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Using email &lt;a href=&quot;https://tylercipriani.com/tags/notes/#using-email&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --search-keys EMAIL&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;using-keyid&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Using keyid &lt;a href=&quot;https://tylercipriani.com/tags/notes/#using-keyid&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --recv-key KEYID&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;sign-keys&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Sign keys &lt;a href=&quot;https://tylercipriani.com/tags/notes/#sign-keys&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --recv-key KEYID&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --sign-key KEYID&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --send-key KEYID&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;photos&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Photos &lt;a href=&quot;https://tylercipriani.com/tags/notes/#photos&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;view-someones-photo&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;View someone&#39;s photo &lt;a href=&quot;https://tylercipriani.com/tags/notes/#view-someones-photo&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --edit-key KEYID showphoto&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;add-a-photo&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Add a photo &lt;a href=&quot;https://tylercipriani.com/tags/notes/#add-a-photo&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Suggested image sizes are 240x288 pixels (GnuPG) or 120x144 pixels (PGP) to make a JPEG of 4K-6K in size. A 1.2 h:w ratio &lt;code&gt;w = h / (144 / 120)&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt; --edit-key KEYID addphoto&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;keysigning-party-etherpad&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Keysigning party etherpad &lt;a href=&quot;https://tylercipriani.com/tags/notes/#keysigning-party-etherpad&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;to-sign-keys&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;To Sign keys &lt;a href=&quot;https://tylercipriani.com/tags/notes/#to-sign-keys&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --recv-key KEYID&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --sign-key KEYID&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --send-key KEYID&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;script-to-quickly-sign-all-keys&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Script to quickly sign all keys &lt;a href=&quot;https://tylercipriani.com/tags/notes/#script-to-quickly-sign-all-keys&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt; &lt;span class=&quot;kw&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;ex&quot;&gt;k&lt;/span&gt; in &lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;grep&lt;/span&gt; pub ksp-wmf-20160108.txt &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;{print $2}&amp;#39;&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;awk&lt;/span&gt; -F &lt;span class=&quot;st&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;#39;{print $2}&amp;#39;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;kw&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;do&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;    &lt;span class=&quot;bu&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;Receiving &lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-3&quot; title=&quot;3&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --recv-key &lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-4&quot; title=&quot;4&quot;&gt;    &lt;span class=&quot;bu&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;Signing key &lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-5&quot; title=&quot;5&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --sign-key &lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-6&quot; title=&quot;6&quot;&gt;    &lt;span class=&quot;bu&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;Sending key &lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-7&quot; title=&quot;7&quot;&gt;    &lt;span class=&quot;ex&quot;&gt;gpg2&lt;/span&gt; --send-key &lt;span class=&quot;va&quot;&gt;$k&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;kw&quot;&gt;done&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;if-you-need-a-key-get-help&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;IF YOU NEED A KEY, GET HELP!! &lt;a href=&quot;https://tylercipriani.com/tags/notes/#if-you-need-a-key-get-help&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;resources&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Resources &lt;a href=&quot;https://tylercipriani.com/tags/notes/#resources&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;PGP/GPG Intro&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://ssd.eff.org/en/module/introduction-public-key-cryptography-and-pgp&quot;&gt;https://ssd.eff.org/en/module/introduction-public-key-cryptography-and-pgp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ssd.eff.org/en/module/how-use-pgp-mac-os-x&quot;&gt;https://ssd.eff.org/en/module/how-use-pgp-mac-os-x&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OpenPGP Best practices&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://help.riseup.net/en/gpg-best-practices&quot;&gt;https://help.riseup.net/en/gpg-best-practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://help.riseup.net/en/security/message-security/openpgp/gpg-keys&quot;&gt;https://help.riseup.net/en/security/message-security/openpgp/gpg-keys&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://web.monkeysphere.info/monkeysign/&quot;&gt;http://web.monkeysphere.info/monkeysign/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;wmf-keysigning&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;WMF Keysigning &lt;a href=&quot;https://tylercipriani.com/tags/notes/#wmf-keysigning&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://people.wikimedia.org/~faidon/ksp-wmf-20160108.txt&quot;&gt;https://people.wikimedia.org/~faidon/ksp-wmf-20160108.txt&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot;&gt;&lt;pre class=&quot;sourceCode txt&quot;&gt;&lt;code class=&quot;sourceCode default&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;SHA256 Checksum: 52F2 CF39   6A54 6D56   7F55 7138   7264 11BA&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-2&quot; title=&quot;2&quot;&gt;                    AEE3 F34E   8880 681C   9A67 75D1   3BBC 74DC              [ ]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-3&quot; title=&quot;3&quot;&gt;                    52F2CF39 6A546D56 7F557138 726411BA AEE3F34E 8880681C 9A6775D1 3BBC74DC&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-4&quot; title=&quot;4&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-5&quot; title=&quot;5&quot;&gt;                    RIPEMD160 Checksum: BB44 91B6 0A4D 5865 2105    2A4C 19FB 11AD 8BCC C3C3    [ ]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-6&quot; title=&quot;6&quot;&gt;                    BB44 91B6 0A4D 5865 2105  2A4C 19FB 11AD 8BCC C3C3&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;mutt-problems&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Mutt problems &lt;a href=&quot;https://tylercipriani.com/tags/notes/#mutt-problems&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;cant-query-passphrase-in-batch-mode&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;&quot;can&#39;t query passphrase in batch mode&quot; &lt;a href=&quot;https://tylercipriani.com/tags/notes/#cant-query-passphrase-in-batch-mode&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Uncomment, &lt;code&gt;use agent&lt;/code&gt; in &lt;code&gt;~/.gnupg/gpg.conf&lt;/code&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;pass-problems&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Pass problems &lt;a href=&quot;https://tylercipriani.com/tags/notes/#pass-problems&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;no-secret-key&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;No Secret Key &lt;a href=&quot;https://tylercipriani.com/tags/notes/#no-secret-key&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;problem&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Problem &lt;a href=&quot;https://tylercipriani.com/tags/notes/#problem&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;gpg&lt;/span&gt;: decryption failed: No secret key&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;solution&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Solution &lt;a href=&quot;https://tylercipriani.com/tags/notes/#solution&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;install &lt;code&gt;pinentry-curses&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.gnupg/gpg-agent.conf&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;pinentry-program /usr/bin/pinentry
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;gpg-connect-agent reloadagent /bye&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2015/12/02/gpg/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2015/12/02/gpg/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>AWS Cloudfront SSL Cert</title>

	<id>https://tylercipriani.com/blog/2015/11/24/aws-certificate/</id>

	<link href="https://tylercipriani.com/blog/2015/11/24/aws-certificate/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		&lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike License&lt;/a&gt;
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="crypto" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2015-11-24T15:40:55Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;Setup an Comodo positive SSL cert on AWS Cloudfront&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Buy Comodo positive SSL cert via namecheap&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect last years cert:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;openssl&lt;/span&gt; req -noout -text -in tylercipriani_com.csr&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate private key and signing request&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;You can generate a new key as a separate step, or as part of the &lt;code&gt;req&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To generate a new key manually use:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;openssl&lt;/span&gt; genrsa -out /path/to/output.key 2048&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;mkdir&lt;/span&gt; -p ~/Projects/Certs/com.tylercipriani/2015-11-24&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/Projects/Certs/com.tylercipriani/2015-11-24&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To generate a new key as part of a signing reuest use:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;openssl&lt;/span&gt; req -sha256 -new -newkey rsa:2048 -nodes -keyout /path/to/output.key -out /path/to/output.csr&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;     &lt;span class=&quot;ex&quot;&gt;ensures&lt;/span&gt; output key is not encrypted ────┘&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Answer lots of questions&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Country&lt;/span&gt; Name (2 letter code) [&lt;span class=&quot;ex&quot;&gt;XX&lt;/span&gt;]:US&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;State&lt;/span&gt; or Province Name (full name) []:&lt;span class=&quot;ex&quot;&gt;Colorado&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Locality&lt;/span&gt; Name (eg, city) [&lt;span class=&quot;ex&quot;&gt;Default&lt;/span&gt; City]:Longmont&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Organization&lt;/span&gt; Name (eg, company) [&lt;span class=&quot;ex&quot;&gt;Default&lt;/span&gt; Company Ltd]:Tyler Cipriani&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Organizational&lt;/span&gt; Unit Name (eg, section) []:&lt;span class=&quot;ex&quot;&gt;.&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Common&lt;/span&gt; Name (eg, your name or your server&lt;span class=&quot;st&quot;&gt;&amp;#39;s hostname) []:tylercipriani.com&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;st&quot;&gt;Email Address []:spam@tylercipriani.com&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;st&quot;&gt;A challenge password []:&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;What is a challenge password: https://tools.ietf.org/html/rfc2985#page-16&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&quot;3&quot; type=&quot;1&quot;&gt;
&lt;li&gt;Should now have a &lt;code&gt;tylercipriani_com.csr&lt;/code&gt; and an &lt;code&gt;tylercipriani_com.key&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Do the namecheap needful:
&lt;ul&gt;
&lt;li&gt;Login to namecheap and activate your certificate&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xsel -p &amp;lt; tylercipriani_com.csr&lt;/code&gt; then paste in the “Enter CSR” field&lt;/li&gt;
&lt;li&gt;Choose, “Apache, Nginx, or Other” as the server type&lt;/li&gt;
&lt;li&gt;Verify the domain, click “Next”&lt;/li&gt;
&lt;li&gt;Verify CSR info, click “Next”&lt;/li&gt;
&lt;li&gt;Select “Email-based” Domain Control Validation (DCV) method&lt;/li&gt;
&lt;li&gt;Company contacts page, “NA” as company name, my address in address, tyler@tylercipriani.com in admin email&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;You’ll get an email that asks you to enter a validation into a Comodo site, do that&lt;/li&gt;
&lt;li&gt;You’ll get an email with &lt;code&gt;tylercipriani_com.zip&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aws configure&lt;/code&gt; to ensure that your awscli is setup&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use awscli to upload&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;ex&quot;&gt;awscli&lt;/span&gt; iam upload-server-certificate \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt;  --server-certificate-name tylercipriani_com_2015-11-24 \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-3&quot; title=&quot;3&quot;&gt;  --certificate-body file://tylercipriani_com.crt \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-4&quot; title=&quot;4&quot;&gt;  --private-key file://tylercipriani_com.key \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-5&quot; title=&quot;5&quot;&gt;  --certificate-chain file://tylercipriani_com.ca-bundle \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-6&quot; title=&quot;6&quot;&gt;  --path /cloudfront/&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Login to your aws dashboard, click cloudfront, go do Distribution Settings, click edit, find the new ssl key name in the dropdown and click, “Yes, edit”&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Should work…&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2015/11/24/aws-certificate/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2015/11/24/aws-certificate/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Asus debian jessie install</title>

	<id>https://tylercipriani.com/blog/2015/06/08/asus-deiban-jessie-install/</id>

	<link href="https://tylercipriani.com/blog/2015/06/08/asus-deiban-jessie-install/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		&lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike License&lt;/a&gt;
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="debian" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2015-06-08T16:48:42Z</published>


	<content type="html" xml:lang="en">
	&lt;ol start=&quot;0&quot; type=&quot;1&quot;&gt;
&lt;li&gt;&lt;p&gt;Reboot, hitting F2 over-and-over&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Turn off Fastboot and Secureboot in UEFI&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download Non-free firmware&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.linuxquestions.org/questions/debian-26/how-to-provide-non-free-firmware-files-to-the-debian-jessie-installer-4175542680/&quot;&gt;Linux Questions Answer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://packages.debian.org/jessie/all/firmware-iwlwifi/download&quot;&gt;firmware-iwlwifi download&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extract firmware from deb&lt;/p&gt;
&lt;p&gt;ar xv firmware-iwlwifi.deb tar xvf data.tar.xz&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy to ext4 formatted sd-card&lt;/p&gt;
&lt;p&gt;mkfs.ext4 /dev/[sd-card] mount -t ext4 /dev/[sd-card] /mnt/sd-card cp -r lib/firmware/* /mnt/sd-card&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert Install Media&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setup installer to recognize dmraid&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wiki.debian.org/DebianInstaller/SataRaid&quot;&gt;SataRaid DebianInstaller&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hit ‘E’ with ‘Install’ selected&lt;/li&gt;
&lt;li&gt;append ‘dmraid=true’ to eol&lt;/li&gt;
&lt;li&gt;F10 to save-and-exit&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detect network hardware&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ctrl-Alt F2&lt;/li&gt;
&lt;li&gt;mkdir /lib/firmware&lt;/li&gt;
&lt;li&gt;blkid (to list mounts)&lt;/li&gt;
&lt;li&gt;mount -t ext4 /dev/sdd1 /lib/firmware&lt;/li&gt;
&lt;li&gt;modprobe ahci&lt;/li&gt;
&lt;li&gt;Ctrl-Alt F1 &lt;yes&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manual partition&lt;/p&gt;
&lt;p&gt;https://wiki.debian.org/DebianInstaller/SoftwareRaidRoot&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run live disk, chroot, fuck around&lt;/p&gt;
&lt;p&gt;http://forums.debian.net/viewtopic.php?f=17&amp;amp;t=116036&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Troubleshooting:&lt;/p&gt;
&lt;p&gt;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711147&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Show root partition:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /proc/cmdline&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;initramfs modules&lt;/p&gt;
&lt;p&gt;/etc/initramfs-tools/modules update-initramfs –k all –u&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Large xterm:&lt;/p&gt;
&lt;p&gt;xterm -fn 10x20&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;chroot&lt;/p&gt;
&lt;p&gt;boot ubuntu live sudo -i cryptsetup luksOpen /dev/mapper/isw_cejababahfd_ASUS_03 cryptroot lvm vgscan lvm vgchange -ay mount /dev/mapper/taskmaster–vg-root /mnt mount /dev/mapper/isw_cejababahfd_ASUS_02 /mnt/boot mount -o bind /sys /mnt/sys mount -t proc /proc /mnt/proc mount -o bind /dev /mnt/dev chroot /mnt&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;chroot &amp;amp; install dmraid&lt;/p&gt;
&lt;p&gt;chroot apt-get install dmraid initramfs modules&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;break raid:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;http://ubuntuforums.org/showthread.php?t=2193133&amp;amp;page=2&amp;amp;p=12913689#post12913689&lt;/p&gt;
&lt;section id=&quot;for-realz-steps&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;For realz Steps! &lt;a href=&quot;https://tylercipriani.com/tags/notes/#for-realz-steps&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;Download Ubuntu 14.04 Live OS and Debian 8.1.0 netinst&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy to a Ubuntu USB Drive:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;use lsblk/blkid to find USB drive name without number, e.g. /dev/sdb NOT /dev/sdb1&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dd bs=4M ~/Downloads/ubuntu-14.04.2-desktop-amd64.iso of=/dev/[usbdrive-without-number]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download Non-free firmware&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.linuxquestions.org/questions/debian-26/how-to-provide-non-free-firmware-files-to-the-debian-jessie-installer-4175542680/&quot;&gt;Linux Questions Answer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://packages.debian.org/jessie/all/firmware-iwlwifi/download&quot;&gt;firmware-iwlwifi download&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extract firmware from deb&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ar xv firmware-iwlwifi.deb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tar xvf data.tar.xz&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy to ext4 formatted sd-card&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mkfs.ext4 /dev/[sd-card]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mount -t ext4 /dev/[sd-card] /mnt/sd-card&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cp -r lib/firmware/* /mnt/sd-card&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Boot Ubuntu from usb/change UEFI opts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Insert Ubuntu USB drive in Asus, Boot while holding F2&lt;/li&gt;
&lt;li&gt;Boot → Fastboot [Disabled]&lt;/li&gt;
&lt;li&gt;Security → Secure Boot Menu → Secure Boot Control [Disabled]&lt;/li&gt;
&lt;li&gt;Advanced → SATA Configuration → SATA Mode Selection [AHCI]&lt;/li&gt;
&lt;li&gt;Boot → Boot Option Priorites (hit + until USB drive is at the top)&lt;/li&gt;
&lt;li&gt;F10 (save and exit)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Try Ubuntu without installing&lt;/li&gt;
&lt;li&gt;Enable network, start terminal (Start → uxterm → xterm -fn 10x20)&lt;/li&gt;
&lt;li&gt;sudo gparted, delete all partitions on /dev/sda /dev/sdb&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create partition table on /dev/sdb:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select /dev/sdb&lt;/li&gt;
&lt;li&gt;Device → Create Partition Table…&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Shutdown, remove usb&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy Debian netinst to USB Drive:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;use lsblk/blkid to find USB drive name without number, e.g. /dev/sdb NOT /dev/sdb1&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo dd bs=4M if=Downloads/debian-8.0.0-amd64-netinst.iso of=[usbdrive-without-number]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detect network hardware&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ctrl-Alt F2&lt;/li&gt;
&lt;li&gt;mkdir /lib/firmware&lt;/li&gt;
&lt;li&gt;blkid (to list mounts)&lt;/li&gt;
&lt;li&gt;mount -t ext4 /dev/sdd1 /lib/firmware&lt;/li&gt;
&lt;li&gt;modprobe ahci&lt;/li&gt;
&lt;li&gt;Ctrl-Alt F1 &lt;yes&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Partition Disks&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manual
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;sda &amp;amp; sbd delete existing partitions&lt;/li&gt;
&lt;li&gt;sda1 256MB EFI System partition&lt;/li&gt;
&lt;li&gt;sda2 512MB mountat /boot ext4&lt;/li&gt;
&lt;li&gt;sda3 REMAINDER physical volume for raid&lt;/li&gt;
&lt;li&gt;sdb1 ALL physical volument for raid&lt;/li&gt;
&lt;li&gt;configure software raid, raid0 [x]sda3 [x]sdb1&lt;/li&gt;
&lt;li&gt;raid0 disk1 use as physical volume for encryption&lt;/li&gt;
&lt;li&gt;configure encrypted volumes [x]/dev/md0&lt;/li&gt;
&lt;li&gt;encrypted-disk 1: use as physical volume for lvm&lt;/li&gt;
&lt;li&gt;configure lvm volume group&lt;/li&gt;
&lt;li&gt;20 GB / ; 4 GB swap ; remainder /home&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Post xmonad-install disable GDM login:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/thcipriani/TheSetup/blob/master/puppet/modules/haskell/manifests/debian.pp#L38-L50&quot;&gt;XMonad Install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/thcipriani/TheSetup/blob/master/puppet/modules/haskell/manifests/debian.pp#L38-L50&quot;&gt;Disable GDM systemd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2015/06/08/asus-deiban-jessie-install/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2015/06/08/asus-deiban-jessie-install/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Cucumber tests getting started</title>

	<id>https://tylercipriani.com/blog/2015/05/27/ruby-test-notes/</id>

	<link href="https://tylercipriani.com/blog/2015/05/27/ruby-test-notes/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="notes" />

	<category term="ruby" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2015-05-27T15:09:45Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;&lt;a href=&quot;https://gorails.com/setup/ubuntu/14.04&quot;&gt;https://gorails.com/setup/ubuntu/14.04&lt;/a&gt;&lt;/p&gt;
&lt;section id=&quot;check-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Check setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#check-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;ruby -v&lt;/li&gt;
&lt;li&gt;gem list selenium&lt;/li&gt;
&lt;li&gt;gem install selenium-webdriver&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;IRB&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;ruby-install&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Ruby install &lt;a href=&quot;https://tylercipriani.com/tags/notes/#ruby-install&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;❯ &lt;span class=&quot;ex&quot;&gt;curl&lt;/span&gt; -fsSL https://gist.github.com/mislav/055441129184a1512bb5.txt &lt;span class=&quot;kw&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;\&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;  &lt;span class=&quot;ex&quot;&gt;rbenv&lt;/span&gt; install --patch 2.2.3&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;ex&quot;&gt;6m&lt;/span&gt; 50s&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;❯ &lt;span class=&quot;ex&quot;&gt;rbenv&lt;/span&gt; global 2.2.2&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;ex&quot;&gt;~&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;❯ &lt;span class=&quot;ex&quot;&gt;ruby&lt;/span&gt; -v&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ruby&lt;/span&gt; 2.2.2p95 (2015-04-13 revision 50295) [&lt;span class=&quot;ex&quot;&gt;x86_64-linux&lt;/span&gt;]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;ex&quot;&gt;~&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-9&quot; title=&quot;9&quot;&gt;❯ &lt;span class=&quot;bu&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;gem: --no-ri --no-rdoc&amp;quot;&lt;/span&gt; &lt;span class=&quot;op&quot;&gt;&amp;gt;&lt;/span&gt; ~/.gemrc&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;~&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;selenium-webdriver&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Selenium webdriver &lt;a href=&quot;https://tylercipriani.com/tags/notes/#selenium-webdriver&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;require &quot;selenium-webdriver&quot; &lt;a href=&quot;https://code.google.com/p/selenium/wiki/RubyBindings&quot;&gt;https://code.google.com/p/selenium/wiki/RubyBindings&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;driver.class &lt;a href=&quot;http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver&quot;&gt;http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;core-tests&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Core tests &lt;a href=&quot;https://tylercipriani.com/tags/notes/#core-tests&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;[mw-core]/tests/browser/features/create_account.feature&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot;&gt;&lt;pre class=&quot;sourceCode ruby&quot;&gt;&lt;code class=&quot;sourceCode ruby&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;dt&quot;&gt;Schenario&lt;/span&gt; &lt;span class=&quot;dt&quot;&gt;Outline&lt;/span&gt; can be passed variable&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;dt&quot;&gt;Scenario&lt;/span&gt;: [&lt;span class=&quot;dt&quot;&gt;English&lt;/span&gt; text] &lt;span class=&quot;co&quot;&gt;# Just a comment, nothing is parsed&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;dt&quot;&gt;Given&lt;/span&gt; [this thing] &lt;span class=&quot;co&quot;&gt;# Sets up the test&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;dt&quot;&gt;When&lt;/span&gt; [other thing] &lt;span class=&quot;co&quot;&gt;# Action that is part of the test&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;dt&quot;&gt;And&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;dt&quot;&gt;But&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;bundler&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Bundler &lt;a href=&quot;https://tylercipriani.com/tags/notes/#bundler&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; [mwcore]/tests/browser&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;bundle&lt;/span&gt; install&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;bundle&lt;/span&gt; exec cucumber features/create_account.feature:14&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;important&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Important &lt;a href=&quot;https://tylercipriani.com/tags/notes/#important&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;BROWSER=&lt;/span&gt;firefox&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;bu&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;MEDIAWIKI_ENVIRONMENT=&lt;/span&gt;mw-vagrant-host&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2015/05/27/ruby-test-notes/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2015/05/27/ruby-test-notes/comments.atom" type="application/atom+xml" />

</entry>
<entry>
	<title>Git annex notes</title>

	<id>https://tylercipriani.com/blog/2015/05/13/git-annex/</id>

	<link href="https://tylercipriani.com/blog/2015/05/13/git-annex/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="computing" />

	<category term="git" />

	<category term="notes" />


	<updated>2017-02-14T15:11:05Z</updated>
	<published>2015-05-13T22:29:34Z</published>


	<content type="html" xml:lang="en">
	&lt;section id=&quot;setup-new-repo&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Setup New repo &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup-new-repo&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;init git:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; init&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;init git annex:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex init local&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add S3 Remote named public-s3&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex initremote public-s3 type=S3 encryption=none bucket=tyler.zone chunk=0&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add file to git annex&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex add [big-file]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;copy current directory to public-s3 remote&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex copy --to public-s3&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;remove local copy—will only remove if already in remote—nothing lost&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex drop [file]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; -a -m &lt;span class=&quot;st&quot;&gt;&amp;#39;initial commit&amp;#39;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id=&quot;setup-nfs-as-remote-using-rsync-over-ssh&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Setup NFS as remote using Rsync over ssh &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup-nfs-as-remote-using-rsync-over-ssh&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://git-annex.branchable.com/special_remotes/rsync/&quot;&gt;Add Rsync as unencrypted remote&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex initremote nas type=rsync rsyncurl=nfs.blazeyandltyler.com:/volume1/homes/tyler/PicturesAnnex encryption=none&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add file to nas&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex copy --to=nas&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id=&quot;pull-down-photos&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Pull down photos &lt;a href=&quot;https://tylercipriani.com/tags/notes/#pull-down-photos&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb10&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;eval&lt;/span&gt; (~/.amazonrc)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex enableremote public-s3&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb10-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex get [whatever]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;make-available-to-the-public-after-public-s3-setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Make available to the public (after public s3 setup): &lt;a href=&quot;https://tylercipriani.com/tags/notes/#make-available-to-the-public-after-public-s3-setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb11&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb11-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex addurl --file [filename] &lt;span class=&quot;st&quot;&gt;&amp;quot;http://tyler.zone/&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex lookupkey [filename]&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;list-remotes-and-remote-info&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;List remotes and remote info &lt;a href=&quot;https://tylercipriani.com/tags/notes/#list-remotes-and-remote-info&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;show-remotes&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Show remotes &lt;a href=&quot;https://tylercipriani.com/tags/notes/#show-remotes&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb12&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb12-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex enableremote&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;show-remote-info&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Show remote info &lt;a href=&quot;https://tylercipriani.com/tags/notes/#show-remote-info&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb13&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb13-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex info [remote-name]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb13-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex info tylercipriani-raw&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;finding-info-about-files&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Finding info about files &lt;a href=&quot;https://tylercipriani.com/tags/notes/#finding-info-about-files&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Find a file:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb14&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb14-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex whereis [filename]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Adding a file to &lt;a href=&quot;http://tyler.zone&quot;&gt;http://tyler.zone&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb15&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;~/.amazonrc&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex copy --to=photo-site [file]&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb15-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex addurl --file [file] &lt;span class=&quot;st&quot;&gt;&amp;quot;http://tyler.zone/&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex lookupkey [filename]&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;sharing-via-amazon-s3&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Sharing via Amazon s3 &lt;a href=&quot;https://tylercipriani.com/tags/notes/#sharing-via-amazon-s3&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;/section&gt;
&lt;section id=&quot;links&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Links &lt;a href=&quot;https://tylercipriani.com/tags/notes/#links&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://git-annex.branchable.com/tips/publishing_your_files_to_the_public/&quot;&gt;http://git-annex.branchable.com/tips/publishing_your_files_to_the_public/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git-annex.branchable.com/tips/using_Amazon_S3/&quot;&gt;http://git-annex.branchable.com/tips/using_Amazon_S3/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id=&quot;setup&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Setup &lt;a href=&quot;https://tylercipriani.com/tags/notes/#setup&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Make amazon bucket with policy:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb16&quot;&gt;&lt;pre class=&quot;sourceCode json&quot;&gt;&lt;code class=&quot;sourceCode json&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-2&quot; title=&quot;2&quot;&gt;  &lt;span class=&quot;dt&quot;&gt;&amp;quot;Version&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;2008-10-17&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;,&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-3&quot; title=&quot;3&quot;&gt;  &lt;span class=&quot;dt&quot;&gt;&amp;quot;Statement&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ot&quot;&gt;[&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-4&quot; title=&quot;4&quot;&gt;    &lt;span class=&quot;fu&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-5&quot; title=&quot;5&quot;&gt;      &lt;span class=&quot;dt&quot;&gt;&amp;quot;Sid&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;AllowPublicRead&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;,&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-6&quot; title=&quot;6&quot;&gt;      &lt;span class=&quot;dt&quot;&gt;&amp;quot;Effect&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;Allow&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;,&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-7&quot; title=&quot;7&quot;&gt;      &lt;span class=&quot;dt&quot;&gt;&amp;quot;Principal&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;{&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-8&quot; title=&quot;8&quot;&gt;        &lt;span class=&quot;dt&quot;&gt;&amp;quot;AWS&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;*&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-9&quot; title=&quot;9&quot;&gt;      &lt;span class=&quot;fu&quot;&gt;},&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-10&quot; title=&quot;10&quot;&gt;      &lt;span class=&quot;dt&quot;&gt;&amp;quot;Action&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;s3:GetObject&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;,&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-11&quot; title=&quot;11&quot;&gt;      &lt;span class=&quot;dt&quot;&gt;&amp;quot;Resource&amp;quot;&lt;/span&gt;&lt;span class=&quot;fu&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&amp;quot;arn:aws:s3:::[bucket-name]/*&amp;quot;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-12&quot; title=&quot;12&quot;&gt;    &lt;span class=&quot;fu&quot;&gt;}&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-13&quot; title=&quot;13&quot;&gt;  &lt;span class=&quot;ot&quot;&gt;]&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb16-14&quot; title=&quot;14&quot;&gt;&lt;span class=&quot;fu&quot;&gt;}&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Put creds out into the environment&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb17&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb17-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;eval&lt;/span&gt; (~/.amazonrc)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb17-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; into repo:&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb17-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; /home/tyler/Projects/Timelapse&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2015/05/13/git-annex/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2015/05/13/git-annex/comments.atom" type="application/atom+xml" />

</entry>

</feed>
