tag:blogger.com,1999:blog-60470262618249725252024-02-20T14:48:23.636-08:00cfkoch-techNetBSD — Unix — multimedia — other funAnonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-6047026261824972525.post-20578023145702510312013-08-26T15:03:00.001-07:002013-08-26T15:03:16.759-07:00New GitHub repo: "cfklp"<p><a href="http://github.com/christiank/cfklp">cfklp</a> is my new minimal LaTeX replacement thing. The idea is to create a printable document from a text file which requires minimal (if any) formatting.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-4858107514844418572013-08-13T14:40:00.001-07:002013-08-26T15:04:14.380-07:00New Git repo: "spread"<p>I wrote a minimal spreadsheet thingy in Awk. You can find it <a href="https://github.com/christiank/spread">here</a>.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-30229957472935522932013-08-03T14:26:00.000-07:002013-08-03T14:26:04.490-07:00Random NetBSD sysctl tricks!<p>There's hardly a message or overarching moral to this entry. I simply
thought this information was interesting...</p>
<p>uptime(1) tells you how long the system has been up, but you can also
discover <em>at what time</em> the machine was started:</p>
<pre><code>$ sysctl kern.boottime
</code></pre>
<p>Get nothing but load averages:</p>
<pre><code>$ sysctl -n vm.loadavg
</code></pre>
<p>By default, NetBSD does not forward network packets, you have to turn it on
yourself:</p>
<pre><code># sysctl -w net.inet.ip.forwarding=1
</code></pre>
<p>And if you use IPv6:</p>
<pre><code># sysctl -w net.inet6.ip6.forwarding=1
</code></pre>
<p>I've never had a need for this, but it appears you can adjust almost
anything you want about NetBSD's in-kernel debugger:</p>
<pre><code>$ sysctl -a | grep ^ddb
ddb.radix = 16
ddb.maxoff = 1048576
ddb.maxwidth = 80
ddb.lines = 24
ddb.tabstops = 8
ddb.onpanic = 0
ddb.fromconsole = 1
ddb.tee_msgbuf = 0
ddb.commandonenter =
</code></pre>
<p>If you've enabled Linux emulation, you can see which version you're running:</p>
<pre><code>$ sysctl -a | grep emul.linux.kern
emul.linux.kern.ostype = Linux
emul.linux.kern.osrelease = 2.6.18
emul.linux.kern.osversion = #0 Wed Mar 3 03:03:03 PST 2010
</code></pre>
<p>Oh yeah, don't forget to use <code>sysctl -d</code> if you don't understand what a
particular field means! I really wish audioctl and mixerctl had similar
functionality.</p>
Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-75041226144062333442013-07-20T12:57:00.001-07:002013-07-20T12:57:54.910-07:00Dotfiles available<p>Just FYI, some of my dotfiles are <a href="http://github.com/christiank/dotfiles">now available on GitHub</a>.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-87555179215201699872013-07-15T13:26:00.002-07:002013-07-15T13:26:56.280-07:00New GitHub repo: "pless"<p>Yeah, I'm in a GitHub mood these days. Mainly because <a href="http://chiselapp.com">Chisel</a> shut down (but the website is STILL up??). Anyway, I created <a href="http://github.com/christiank/pless">pless</a>, a screen-oriented pager. It's like less(1) except better.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-57577822932249455242013-07-14T13:44:00.000-07:002013-07-14T13:44:09.790-07:00New repo on GitHub: "pres"<p>FYI, I've created a new repo on GitHub for the first time in a while. It's for a stupid-simple Curses-based slidseshow presentation thing called <a href="http://github.com/christiank/pres">pres</a>. That's all.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-72153377770875824192013-07-08T12:10:00.003-07:002013-07-08T12:10:47.843-07:00A few wishes for NetBSD<p>A few things I wish about NetBSD:</p>
<ul>
<li><p>Userland tools to manipulate cdb(5) databases and proplib(3) property
lists. I actually went ahead and built a super minimal cdb(5) reader
and writer. I'll post the source soon. nbperf(1) is too weird for this
task.</p></li>
<li><p>Get rid of azalia(4). Trash it. It's a piece of garbage. I mean it
shouldn't even be in the source tree. Enable hdaudio(4) by default in
GENERIC.</p></li>
<li><p>I personally think it would be <strong>awesome</strong> to have a graphical utility
which generates kernel configuration files. It'd be a sort of wizard.</p></li>
<li><p>There needs to be a way to programmatically discover which devices
depend on which other devices, and the minimum set of kernel config
options needed to get it to work. Currently I'm running "make depend"
and hoping it doesn't fail. I'm suggesting something which I can query
at any time, without the need to refer to chapter 4 man pages.</p></li>
<li><p>A perfectly painless Raspberry Pi and/or Beagleboard install, with
instructions on netbsd.org (not some random person's blog).</p></li>
<li><p>More widespread use of cdb(5) databases. We use them for terminfo
files, why not tons of other places?</p></li>
</ul>
<p>More to come...</p>
Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-51608722740904292862013-07-06T12:58:00.001-07:002013-07-07T12:14:43.309-07:00Maintaining a private Terminfo database<p>So I just installed the <a href="http://st.suckless.org">st(1)</a> terminal emulator,
but I didn't bother with the
<a href="https://en.wikipedia.org/wiki/Terminfo">Terminfo</a> entry it ships with. For
some reason I was kind of allergic to the idea of modifying
<code>/usr/share/misc/terminfo</code>. I felt like I could wipe something out
entirely...</p>
<p>Well it turns out you don't ever need to touch <code>/usr/share/misc/terminfo</code>.
On NetBSD at least, you can maintain a private terminfo database in your
home directory. Here's what I did to get st(1)'s terminfo working without
touching <code>/usr/share/misc/terminfo</code>:</p>
<ol>
<li><p> st(1) is the only terminal emulator I use which needs its own terminfo
entry that does <strong>not</strong> ship with the system, so I just copied the
<code>st.info</code> file from st(1)'s tarball to <code>~/.terminfo</code> (that's a file, not a
directory).</p></li>
<li><p> Run tic(1) over it: <code>$ tic ~/.terminfo</code></p></li>
<li><p> This generates a
<a href="http://netbsd.gw.com/cgi-bin/man-cgi?cdb++NetBSD-current">cdb(5)</a>
database to <code>~/.terminfo.cdb</code>. That's a feature specific to NetBSD.</p></li>
<li><p> In my <code>.bashrc</code> I added this:</p>
<p>export TERM=st</p></li>
<li><p> Restart st(1).</p></li>
</ol>
<p>Done! Now tmux's split windows actually look good. <s>And my DEL and DELETE
keys behave!</s> (Edit: I <em>swear</em> my forward delete worked, now it
doesn't??)</p>
<p>And if I ever needed to add <em>another</em> terminfo entry then I would <em>append</em>
it to <code>~/.terminfo</code> and run tic(1) again.</p>
Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-33582492042719110662013-07-05T23:58:00.000-07:002013-07-05T23:58:32.390-07:00Resize text on the fly with st(1)<p>Earlier today I discovered by accident that you can press Shift+PGUP or Shift+PGDN inside <a href="http://st.suckless.org/">st(1)</a> to increase or decrease the size of the text.</p>
<p>Wha?? Why isn't this awesome feature documented anywhere?? Furthermore, I confirmed that xterm(1) and urxvt(1) don't have that functionality. At least with that particular combination of keys.</p>
<p>Anyway, that's pretty frackin' awesome — you know, PFA.</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com0tag:blogger.com,1999:blog-6047026261824972525.post-14068829384253100582013-07-05T23:34:00.001-07:002013-07-06T12:58:20.108-07:00New blog!<p>Hey everybody. I got sick and tired of posting my techie/computer/nerdy stuff on Facebook, so I decided to create a little space on the web dedicated just for that. I <strong>could</strong> have built my own blog engine to make it extra techie (and I have done that before), but I wanted something free, quick and relatively without hassle, and I have an account with Google already (only for YouTube, really) so I set everything up here on Blogger.</p>
<p>This doesn't particularly <strong>look</strong> like a Google Blogger blog (take a look at how clean this page's source is!), but that's because I hacked some things quite a bit.</p>
<p>Anyway, I promise to update this!</p>Anonymoushttp://www.blogger.com/profile/07155866126151474944noreply@blogger.com2