<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www-cs-students.stanford.edu/~mquigley/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www-cs-students.stanford.edu/~mquigley/feed.php">
        <title>Morgan Quigley misc</title>
        <description></description>
        <link>http://www-cs-students.stanford.edu/~mquigley/</link>
        <image rdf:resource="http://www-cs-students.stanford.edu/~mquigley/lib/images/favicon.ico" />
       <dc:date>2013-06-22T15:11:34-07:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:android&amp;rev=1296884327&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:arm&amp;rev=1335303745&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:coding&amp;rev=1320773086&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:donuts&amp;rev=1303944426&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:kernel&amp;rev=1301690311&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:misc&amp;rev=1340347794&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:rsync&amp;rev=1298344628&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:subversion&amp;rev=1299954670&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:udev&amp;rev=1308721021&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:video&amp;rev=1316578321&amp;do=diff"/>
                <rdf:li rdf:resource="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:xilinx&amp;rev=1339535195&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www-cs-students.stanford.edu/~mquigley/lib/images/favicon.ico">
        <title>Morgan Quigley</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/</link>
        <url>http://www-cs-students.stanford.edu/~mquigley/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:android&amp;rev=1296884327&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-02-04T21:38:47-07:00</dc:date>
        <title>misc:android</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:android&amp;rev=1296884327&amp;do=diff</link>
        <description>coding android without using Eclipse


&lt;http://blogs.nitobi.com/joe/2010/03/26/android-without-eclips/&gt;

create a project using “android create”

start up an emulator using “emulator -avd NAME”  where NAME is a directory name in ~/.android/avd</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:arm&amp;rev=1335303745&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-04-24T14:42:25-07:00</dc:date>
        <title>misc:arm</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:arm&amp;rev=1335303745&amp;do=diff</link>
        <description>I do a lot of bare-metal programming on ARM. Here are a few notes of things that are useful to me but are often deeply buried in datasheets:

ARM Cortex M3/M4 (at least, Freescale / Atmel) useful registers for when you bork your code:

	*  0xe000e300  is the start of the active interrupts NVIC register
	*  0xe000e400  is the start of the interrupt priority registers
	*  0xe000ed08  vector table offset register
	*  0xe000ed28  configurable fault status register. see p.227 of ARM cortex-m4 manual
…</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:coding&amp;rev=1320773086&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-11-08T09:24:46-07:00</dc:date>
        <title>misc:coding</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:coding&amp;rev=1320773086&amp;do=diff</link>
        <description>Random coding notes...

Creating timestamp strings

Python



datetime.datetime.now().strftime(&quot;%Y%m%d%H%M%S&quot;)


C (POSIX)



char ts_buf[64] = &quot;&quot;;
struct timeval tv;
struct tm *tm;
gettimeofday(&amp;tv, NULL);
if ((tm = localtime(&amp;tv.tv_sec)) != NULL)
  strftime(ts_buf, sizeof(ts_buf), &quot;%Y%m%d%H%M%s&quot;, tm);</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:donuts&amp;rev=1303944426&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-04-27T15:47:06-07:00</dc:date>
        <title>misc:donuts</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:donuts&amp;rev=1303944426&amp;do=diff</link>
        <description>deep thoughts, 27 April 2011:

I just sent out some tiny donut-shaped PCB's to be manufactured. They are mildly exotic and cost $1800 for a dozen of them. Naturally, I laid out the array like a 4×3 krispy kreme donut box. Which got me thinking: a box of 12 krispy kremes costs $8. Thus I could have bought 225 krispy kreme boxes for the price of 1 dozen donut pcb's. That's 2700 donuts. Each donut has 200 calories. That means that instead of just 12 tiny donut-shaped pcb's, I could have had 6 month…</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:kernel&amp;rev=1301690311&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-04-01T13:38:31-07:00</dc:date>
        <title>misc:kernel</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:kernel&amp;rev=1301690311&amp;do=diff</link>
        <description>Kernel module tips


I sometimes want to make minor tweaks to various linux kernel modules. This page just keeps track of my notes on how to do this easily on Ubuntu, building only the single module that has been modified, rather than building the whole kernel.</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:misc&amp;rev=1340347794&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-06-21T23:49:54-07:00</dc:date>
        <title>misc:misc</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:misc&amp;rev=1340347794&amp;do=diff</link>
        <description>*  Using Xilinx tools on Ubuntu
	*  ARM programming notes
	*  Linux video editing notes
	*  Random coding notes
	*  Kernel module tips
	*  subversion
	*  android
	*  rsync cheat sheet
	*  udev rules

hacking on ARM Cortex-M3 with openocd/gdb


rule #1: thou shalt remember to use the cross-compiled GDB when debugging remote embedded targets! in other words, use “arm-none-eabi-gdb” not “gdb”</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:rsync&amp;rev=1298344628&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-02-21T19:17:08-07:00</dc:date>
        <title>misc:rsync</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:rsync&amp;rev=1298344628&amp;do=diff</link>
        <description>Rsync is great for doing big copies between hosts, since it can restart where it left off when/if the connection is broken or Ctrl-C'ed. But I always forget how to use it. Here are a few incantations:

To copy a local directory tree to a remote host:</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:subversion&amp;rev=1299954670&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-03-12T10:31:10-07:00</dc:date>
        <title>misc:subversion</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:subversion&amp;rev=1299954670&amp;do=diff</link>
        <description>Subversion notes (on Ubuntu 10.10, anyway)

Creating a new repository



sudo svnadmin create PATH_TO_REPOSITORY



if on a network filesystem, add:


--fs-type=fsfs

Make sure it's owned by the webserver. On Ubuntu:



sudo chown -R www-data:subversion PATH_TO_REPOSITORY</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:udev&amp;rev=1308721021&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-06-21T22:37:01-07:00</dc:date>
        <title>misc:udev</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:udev&amp;rev=1308721021&amp;do=diff</link>
        <description>udev rules

i can never remember how to do this on Ubuntu, so i'm writing it here:

to find out the magic strings to match in a udev rule:



udevadm info -a -n PATH_TO_DEVICE



where PATH_TO_DEVICE is something like /dev/bus/usb/CONTROLLER/DEVICE

make sure to create udev rules *only* using attributes/subsystems/etc listed in the same device in the hierarchy! otherwise it won't match.</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:video&amp;rev=1316578321&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2011-09-20T21:12:01-07:00</dc:date>
        <title>misc:video</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:video&amp;rev=1316578321&amp;do=diff</link>
        <description>Creating demo videos with no sound for n00bs running windows:


ffmpeg -b BITRATE -i INPUT -vcodec wmv2 -ss START_TIME -an OUTPUT.wmv


Random unsorted notes


Extract DV from mpeg-4, to go to iMovie:



ffmpeg -y -i INPUT.m4v -map 0.0:0.0 -f dv -vcodec dvvideo -b 25000 -aspect 16:9 -r ntsc -g 240 -qmin 2 -qmax 15 -acodec pcm_s16le -ab 1411 -ar 48000 -ac 2 -map 0.1:0.1 -target ntsc-dv -ss START_TIME -t LENGTH OUTPUT.dv</description>
    </item>
    <item rdf:about="http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:xilinx&amp;rev=1339535195&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2012-06-12T14:06:35-07:00</dc:date>
        <title>misc:xilinx</title>
        <link>http://www-cs-students.stanford.edu/~mquigley/doku.php?id=misc:xilinx&amp;rev=1339535195&amp;do=diff</link>
        <description>on Ubuntu 12.04, toss the .hex firmware file somewhere (in this bad example, /usr/share) and use a udev rule something like this for the Platform Cable USB II:


SUBSYSTEMS==&quot;usb&quot;, ACTION==&quot;add&quot;, ATTRS{idVendor}==&quot;03fd&quot;, ATTRS{idProduct}==&quot;0013&quot;, MODE=&quot;666&quot;, RUN+=&quot;/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode&quot;</description>
    </item>
</rdf:RDF>
