<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pages on John Stowers</title><link>https://johnstowers.co.nz/pages/</link><description>Recent content in Pages on John Stowers</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 26 Feb 2013 10:31:37 +0000</lastBuildDate><atom:link href="https://johnstowers.co.nz/pages/index.xml" rel="self" type="application/rss+xml"/><item><title>Python Print / String Format Reference</title><link>https://johnstowers.co.nz/pages/python-print-format-reference.html</link><pubDate>Tue, 26 Feb 2013 10:31:37 +0000</pubDate><guid>https://johnstowers.co.nz/pages/python-print-format-reference.html</guid><description>Bash Cheat Sheet</description></item><item><title>Make Quick Reference</title><link>https://johnstowers.co.nz/pages/make-quick-reference.html</link><pubDate>Fri, 15 Jul 2011 14:38:30 +0000</pubDate><guid>https://johnstowers.co.nz/pages/make-quick-reference.html</guid><description>&lt;p&gt;This page contains a minimal GNU Make reference, adapted for my use from&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.gnu.org/software/make/manual/make.html#toc_Quick-Reference" rel="noopener"&gt;The official quick reference&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;strong&gt;Automatic Variables:&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is a summary of the automatic variables. See &lt;a href="http://www.gnu.org/software/automake/manual/make/Automatic-Variables.html#Automatic-Variables" rel="noopener"&gt;Automatic Variables&lt;/a&gt;
, for full information.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$@ The file name of the target.
$% The target member name, when the target is an archive member.
$&amp;lt; The name of the first prerequisite.
$? The names of all the prerequisites that are newer than the target, with spaces between them.
$+
$^ The names of all the prerequisites, with spaces between them.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The value of &lt;code&gt;$^&lt;/code&gt; omits duplicate prerequisites, while &lt;code&gt;$+&lt;/code&gt; retains them and preserves their order.&lt;/p&gt;</description></item><item><title>Autotools Quick Reference</title><link>https://johnstowers.co.nz/pages/autotools-quick-reference.html</link><pubDate>Tue, 03 Nov 2009 07:44:22 +0000</pubDate><guid>https://johnstowers.co.nz/pages/autotools-quick-reference.html</guid><description>&lt;p&gt;You can use then the following basic autotools setup, which is just 9 lines. You can start from here and add more stuff (including libtool).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;configure.ac:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;AC_INIT([package], [version]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_HEADERS([config.h]) # not even really needed AC_PROG_CC # or AC_PROG_CXX AC_CONFIG_FILES([Makefile]) AC_OUTPUT&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Makefile.am:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;bin_PROGRAMS = hello hello_SOURCES = hello.c&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s enough for:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ autoreconf -fvi $ ./configure $ make&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;On top of this, for each package you need, you add:&lt;/p&gt;</description></item><item><title>Altium Designer Tips</title><link>https://johnstowers.co.nz/pages/altium-designer-tips.html</link><pubDate>Tue, 01 Apr 2008 12:24:36 +0000</pubDate><guid>https://johnstowers.co.nz/pages/altium-designer-tips.html</guid><description>&lt;p&gt;Note &lt;code&gt;[PCB+SCH]&lt;/code&gt; means &lt;strong&gt;command&lt;/strong&gt; is available in PCB and Schematic mode,
&lt;code&gt;[PCB]&lt;/code&gt; means it is only available in the PCB editor.
_View &lt;strong&gt;»&lt;/strong&gt; Desktop Layouts &lt;strong&gt;»&lt;/strong&gt; descrives navigating the &lt;em&gt;View&lt;/em&gt; menu.&lt;/p&gt;
&lt;h3 id="you-favorite-keyboard-shortcuts"&gt;You Favorite Keyboard Shortcuts&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[PCB+SCH]&lt;/code&gt; &lt;strong&gt;Space&lt;/strong&gt; to rotate components, change routing orientation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[PCB+SCH]&lt;/code&gt; &lt;strong&gt;Tab&lt;/strong&gt; to change properties of the component you are placing&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[PCB+SCH]&lt;/code&gt; &lt;strong&gt;Page Up/Down&lt;/strong&gt; zooms in and out of the design&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[PCB+SCH]&lt;/code&gt; &lt;strong&gt;Ctrl+Mousewheel&lt;/strong&gt; zooms in/out&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;[PCB+SCH]&lt;/code&gt; &lt;strong&gt;Shift+Mousewheel&lt;/strong&gt; pans left/right&lt;/p&gt;</description></item><item><title>Unix Commands</title><link>https://johnstowers.co.nz/pages/unix-commands.html</link><pubDate>Wed, 17 Oct 2007 20:38:47 +0000</pubDate><guid>https://johnstowers.co.nz/pages/unix-commands.html</guid><description>&lt;h3 id="command-list"&gt;Command List&lt;/h3&gt;
&lt;h4 id="general-commands"&gt;General Commands&lt;/h4&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Command&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;apropos word&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Show commands pertinent to word.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;which command&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Show full path name of command&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;time command&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;See how long a command takes&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;time cat&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Start stopwatch. Ctrl-D to stop.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;nice info&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Run a low priority command (info in this case)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;renice 19 -p $$&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Make shell (script) low priority. Use for non interactive tasks&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;look prefix&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Quickly search (sorted) dictionary&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;gpg -c file&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Encrypt file&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;gpg file.gpg&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Decrypt file&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;watch -n1 'cat /proc/interrupts'&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Watch changeable data continuously&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;alias hd='od -Ax -tx1z -v'&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Handy hexdump&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;alias rp='readlink -f'&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Canonicalize path.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;touch -c -t 0304050607 file&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Set file timestamp (YYMMDDhhmm)&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id="directory-navigation"&gt;Directory Navigation&lt;/h4&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Command&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;cd -&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Go to previous directory&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;cd&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Go to home directory&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;(cd dir &amp;amp;&amp;amp; command)&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;cd, execute a command and return&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;pushd .&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Put current dir on stack so you can &lt;em&gt;popd&lt;/em&gt; back to it&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id="cd-commands"&gt;CD Commands&lt;/h4&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Command&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;gzip &amp;lt; /dev/cdrom &amp;gt; cdrom.iso.gz&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Save copy of data cdrom&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;mount -o loop cdrom.iso /mnt/dir&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Mount the cdrom image at /mnt/dir (read only)&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id="archives"&gt;Archives&lt;/h4&gt;
&lt;p&gt;Command
Description&lt;/p&gt;</description></item><item><title>Vim Cheat Sheet</title><link>https://johnstowers.co.nz/pages/vim-cheat-sheet.html</link><pubDate>Wed, 17 Oct 2007 20:37:03 +0000</pubDate><guid>https://johnstowers.co.nz/pages/vim-cheat-sheet.html</guid><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Working with files&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Vim command&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Action&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;:e filename&lt;/p&gt;
&lt;p&gt;Open a new file. You can use the Tab key for automatic file name completion, just like at the shell command prompt.&lt;/p&gt;
&lt;p&gt;:w filename&lt;/p&gt;
&lt;p&gt;Save changes to a file. If you don&amp;rsquo;t specify a file name, Vim saves as the file name you were editing. For saving the file under a different name, specify the file name.&lt;/p&gt;
&lt;p&gt;:q&lt;/p&gt;
&lt;p&gt;Quit Vim. If you have unsaved changes, Vim refuses to exit.&lt;/p&gt;</description></item><item><title>Bash Cheat Sheet</title><link>https://johnstowers.co.nz/pages/bash-cheat-sheet.html</link><pubDate>Wed, 17 Oct 2007 20:35:37 +0000</pubDate><guid>https://johnstowers.co.nz/pages/bash-cheat-sheet.html</guid><description>&lt;p&gt;This file contains short tables of commonly used items in this shell. In most cases the information applies to both the Bourne shell (sh) and the newer bash shell.&lt;/p&gt;
&lt;p&gt;The best resource for understanding existing shell scripts is &lt;a href="http://explainshell.com/" rel="noopener"&gt;explainshell&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Good practices:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::::bash
#!/bin/bash #Explicitly tell shell this is a bash script
set -e #Exit as soon as any line in the bash script fails
set -x #Prints each command executed (prefix with ++)
set -ex #Do both (for good practice)
set -u #Exit if a referenced variable is not declared
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Tests (for ifs and loops) are done with [ ] or with the test command.&lt;/p&gt;</description></item><item><title>Reference</title><link>https://johnstowers.co.nz/pages/reference.html</link><pubDate>Wed, 17 Oct 2007 20:33:02 +0000</pubDate><guid>https://johnstowers.co.nz/pages/reference.html</guid><description>&lt;p&gt;These pages contain a small amount of reference information that I frequently refer to.
They may be usful to others so I am publishing them here.&lt;/p&gt;
&lt;h5 id="computer-related"&gt;Computer Related&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/bash-cheat-sheet.html"&gt;Bash Cheat Sheet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/vim-cheat-sheet.html"&gt;Vim Cheat Sheet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/unix-commands.html"&gt;Unix Command Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/autotools-quick-reference.html"&gt;Autotools Quick Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/make-quick-reference.html"&gt;GNU Make Quick Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/python-print-format-reference.html"&gt;Python Print Format Reference&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="electronics-related"&gt;Electronics Related&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://johnstowers.co.nz/pages/altium-designer-tips.html"&gt;Altium Designer Tips&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>About Me</title><link>https://johnstowers.co.nz/pages/about-me.html</link><pubDate>Sun, 25 Jun 2006 22:16:09 +0000</pubDate><guid>https://johnstowers.co.nz/pages/about-me.html</guid><description>&lt;p&gt;&lt;figure class="img"&gt;
 &lt;img src="https://johnstowers.co.nz/images/imported/jrs89.jpg" alt="GRC Pic" loading="lazy" decoding="async"&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Hey, I&amp;rsquo;m a &lt;a href="http://www.imp.ac.at/research/research-groups/straw-group/group-members/" rel="noopener"&gt;Postdoc&lt;/a&gt;
,
working in collaboration with &lt;a href="http://www.strawlab.org" rel="noopener"&gt;Strawlab&lt;/a&gt;
 and
&lt;a href="http://www.acin.tuwien.ac.at/1/" rel="noopener"&gt;TU Wien&lt;/a&gt;
. We study the visual flight control
behaviour of freely flying Drosophila using panoramic virtual reality.&lt;/p&gt;
&lt;p&gt;I am currently living in Vienna, Austria.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contact Details:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Email: &lt;figure class="img"&gt;
 &lt;img src="https://johnstowers.co.nz/images/imported/johnemail.png" alt="My Email Address" loading="lazy" decoding="async"&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;Blog: &lt;a href="http://www.johnstowers.co.nz" rel="noopener"&gt;http://www.johnstowers.co.nz&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I grew up on a dairy farm in a small town called
&lt;a href="http://www.google.com/maps?f=q&amp;amp;hl=en&amp;amp;q=Te&amp;#43;Aroha&amp;#43;new&amp;#43;zealand&amp;amp;ie=UTF8&amp;amp;z=12&amp;amp;ll=-37.526609,175.709839&amp;amp;spn=0.116535,0.344696&amp;amp;t=h&amp;amp;om=1&amp;amp;iwloc=addr" rel="noopener"&gt;Te Aroha.&lt;/a&gt;
 I have one sister, also a graduate of the University of Canterbury. My Undergraduate degree was in &lt;a href="http://www.elec.canterbury.ac.nz/" rel="noopener"&gt;Electrical Engineering.&lt;/a&gt;
 I then completed a Masters in Engineering management, looking at commercializing and monetization of Open Source projects, including open source hardware designs.&lt;/p&gt;</description></item><item><title>git-cheat-sheet</title><link>https://johnstowers.co.nz/pages/git-cheat-sheet.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://johnstowers.co.nz/pages/git-cheat-sheet.html</guid><description>&lt;h2 id="git-cheat-sheet"&gt;Git cheat sheet&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configure tooling&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;git config &amp;ndash;global user.name &amp;ldquo;[name]&amp;rdquo;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sets the name you want attached to your commit transactions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;git config &amp;ndash;global user.email &amp;ldquo;[email address]&amp;rdquo;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sets the email you want attached to your commit transactions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;git config &amp;ndash;global color.ui auto&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enables helpful colorization of command line output&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;git config &amp;ndash;global push.default current&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update a branch with the same name as current branch if no refspec is given&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;git config &amp;ndash;global core.editor [editor]&lt;/p&gt;</description></item><item><title>Python Cheat Sheet</title><link>https://johnstowers.co.nz/pages/python-cheat-sheet.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://johnstowers.co.nz/pages/python-cheat-sheet.html</guid><description>&lt;p&gt;&lt;a href="http://mkaz.com/solog/python-string-format" rel="noopener"&gt;http://mkaz.com/solog/python-string-format&lt;/a&gt;
&lt;/p&gt;</description></item></channel></rss>