Mutt's configuration is sometime more a toolbox than something offering ready
solutions, and "how to I use multiple accounts?" is one of the most FAQs.
Here's a condensed version of my setup.
In the most simple solution, just 'c'hange folders to the IMAP server:
c imaps://imap.example.com <enter>
c imaps://imap.otherdomain.tld <enter>
That's cumbersome to type, so let's automate it:
# .mutt/muttrc
macro index <f2> '<change-folder>imaps://imap.example.com<enter>'
macro index <f3> '<change-folder>imaps://imap.otherdomain.tld<enter>'
That would be the basic setup.
The two accounts have settings associated with them, we put them in two files:
# .mutt/account.example
set from=me@example.com
set hostname="example.com"
set folder="imaps://imap.example.com/"
set postponed="=Drafts"
set spoolfile="imaps://imap.example.com/INBOX"
set signature="~/.mutt/signature.example"
# .mutt/account.otherdomain
set from=myself@otherdomain.tld
set hostname="otherdomain.tld"
set folder="imaps://imap.otherdomain.tld/"
set postponed="=Drafts"
set spoolfile="imaps://imap.otherdomain.tld/INBOX"
set signature="~/.mutt/signature.otherdomain"
Now all that's left to do is two folder-hooks to load the files:
# .mutt/muttrc
folder-hook 'example.com' 'source ~/.mutt/account.example'
folder-hook 'otherdomain.tld' 'source ~/.mutt/account.otherdomain'
# switch to default account on startup
source ~/.mutt/account.example
A slight variation of the macros also uses the account files:
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/account.example<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/account.otherdomain<enter><change-folder>!<enter>'
To save entering the password all the time, we use account-hooks:
account-hook example.org 'set imap_user=me imap_pass=pw1'
account-hook otherdomain.tld 'set imap_user=myself imap_pass=pw2'
Putting passwords in configs isn't something I like, so I pull them from the
Gnome keyring:
set my_pw_example= gnome-keyring-query get mutt_example
set my_pw_otherdomain= gnome-keyring-query get mutt_otherdomain
account-hook example.org 'set imap_user=me imap_pass=$my_pw_example'
account-hook otherdomain.tld 'set imap_user=myself imap_pass=$my_pw_otherdomain'
(I found gnome-keyring-query in the
Gentoo Wiki.)
Martti Rahkila has more verbose article with similar ideas.
The Google books ngram datasets
are a nice resource for playing with text generation. I've created
a program that will, given a starting phrase, blather on by
connecting phrases from the datasets.
The results are much more varied, and seem to more often
make sense than most Markov text generators I've seen before, such as
dadadodo. It had better be -- it's
working with data derived from 4% of all books ever written!
Some examples. Do they tell a story?
(The starting phrase I entered is in italics.)
gbp-clone --upstream-branch=upstream/master --pristine-tar git://git.debian.org/git/pkg-lvm/multipath-tools.git
This will additionally set up master, upstream/master and
pristine-tar to track the corresponding remote branches. There's no
--debian-branch option in the above example since master is the default.
If you want to safely update these branches at a later point invoke
gbp-pull --upstream-branch=upstream/master --pristine-tar
from inside the repository. This will only update the branches if they can be
fast-forwarded. If the repository has a debian/gbp.conf describing the
branch layout a call to
gbp-pull
is enough.
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk
DEB_QMAKE_CONFIG_VAL += build64
DEB_QMAKE_ARGS = qcs.pro
build/qutecsound::
[ -f bin/qutecsound ] mv bin/qutecsound-d bin/qutecsound
clean::
rm -f bin/qutecsound
QMAKE = qmake-qt4
DEB_BUILD_PARALLEL = 1
DEB_INSTALL_MANPAGES_qutecsound = debian/qutecsound.1
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk
QMAKE = qmake-qt4
DEB_QMAKE_CONFIG_VAL += build64
DEB_QMAKE_ARGS = qcs.pro
DEB_BUILD_PARALLEL = 1
DEB_INSTALL_MANPAGES_qutecsound = debian/qutecsound.1
build/qutecsound::
[ -f bin/qutecsound ] mv bin/qutecsound-d bin/qutecsound
clean::
rm -f bin/qutecsound
We had another meeting of the
Chicago R User Group
last evening. This was scheduled somewhat belatedly once we learned
that Drew Conway would be in town.
Drew gave a very nice talk about his brand new
infochimps
package (for accessing the eponymous
infochimps data service and marketplace). Slides are
available on Drew's blog.
In fact, he had already blogged about his talk before I had even started
to write my slides...
The user group meetings have a meme of showing how to use
R
with different editors, UIs, IDEs,... It started with a presentation on
Eclipse and its
StatET plugin. So a while
ago I had offered to present on ESS, the wonderful
Emacs mode for R (and as well as SAS, Stata, BUGS, JAGS, ...). And now I owe a big
thanks to the ESS Core team for keeping all their documentation, talks,
papers etc in their SVN archive,
and particularly to Stephen Eglen
for putting the source code to Tony Rossini's tutorial from
useR! 2006 in Vienna
there. This allowed me to quickly whip up
a few slides
though a good part of the presentation did involve a live demo missing from
the slides. Again, big thanks to Tony for the old slides and to Stephen for
making them accessible when I mentioned the idea of this talk a while back --
it allowed to put this together on short notice.
And for those going to
useR! 2011 in
Warwick next summer,
Stephen will present a
full three-hour
ESS tutorial
which will cover
ESS in much more detail.
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=dedasys-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=0470929839" style="width: 120px; height: 240px;"></iframe> I got this to read on my trip to Oregon. Initially I was a bit dubious, after reading the chapter headings on Amazon. Indeed, if you read a lot of articles about tech startups, a lot of the material is not particularly novel, and are things that you've already read elsewhere. If, on the other hand, you're looking for a quick introduction to some of the common ideas behind web/tech startups, it's a pretty good list, written by a variety of people, with a lot of practical advice. The list of concepts includes "execution, not ideas", "fail fast", get feedback early", "get a co-founder", and a lot of similar advice that permeates discussions of early stage internet companies. Other people have different tastes, but for me, this passage was a strikingly effective advertisement for living in Boulder, Colorado:
With this as the backdrop, it was natural to make cycling a central part of my work with Everlater's founders, Nate Abbott and Natty Zola. Nate, Natty, and I scheduled regular weekly rides (sometimes several times a week) and while we didn't keep a formal agenda, each ride had a number of topics planned out for us to cover. In this way, we worked through many of the early challenges the business faced as it moved from idea to reality in the course of the summer of 2009. Our typical rides lasted from 60 to 90 minutes during which time we were able to focus on the business without interruption. And while getting some fresh air helps bring perspective, it's hard to avoid thinking about problems in a new way when you're out of the office, surrounded by the beauty of the Boulder foothills while your mind is completely clear. Startups, cycling, mountains... sign me up! Another tidbit I found interesting:
We often talk about the Number One startup killer at TechStars making a product for which there is no interesting market. TechStars accepts just 10 of more than 600 startups that apply and presumably they are among the best. But still, we find that at least one-third of those startups are attempting to build a product that they want, or that no one wants, instead of what the market wants But wait, I thought "execution is everything", and "ideas are worthless". It seems like avoiding bad ideas is potentially worth a whole lot of money in wasted time and energy though, no? The bit about ideas being worthless is a load of crap. The reason there is no market for ideas is that they are not "excludable". There was never a market for lighthouses either, the classic example in economics of a public good. So the government built them, and they were valuable to people operating ships. Ideas for startups may not have a lot of value compared to people executing them well, but to say they are worthless is hyperbole. In any case, though, if you're interested in startups, or especially if you happen to be interested in the TechStars program, it's book full of good advice, even if none of it will come as a revalation to anyone who follows that sort of thing regularly.
This has been bugging me ever since we got our Sony Internet TV, and I think
I've finally figured out what's going on.
Pandora hasn't been working on the Google TV ever since we got it, it just
spits out Unexpected HTTP error occurred code: 417 while
StartupAsyncTask and that's the end of that. I have vague
recollections seeing this on my phone in the past also, but this doesn't
appear to be the case any longer. My phone has version 1.5.2 on it, and the
TV has 1.0, so I think I see the problem here.
I took a full packet capture while starting up Pandora, and it was a lot
more revealing. I could see that it was my Squid proxy (I transparently run
all HTTP traffic through Squid) was barfing. That'd explain the errors I was
seeing in Squid's cache.log
parseHttpRequest: Unsupported method '' clientTryParseRequest: FD 153 (172.16.1.5:55001) Invalid RequestLooking at the headers of the HTTP request that the Pandora client is sending out, I see Expect: 100-Continue, and the text that accompanies a HTTP 417 error is "Expectation Failed", so I think this is the culprit. Searching for Expect: 100-Continue squid turns up information for an ignore_expect_100 directive, but this appears to only be available if Squid is compiled with --enable-http-violations, which the Debian Squid package doesn't appear to be compiled with. I may have to adjust my transparent proxying rules to not transparently proxy the TV, but this makes me a bit sad. Update I tried adding ignore_expect_100 on anyway, and Squid took it, and now Pandora isn't barfing. Yay!
So, I've been working on multitouch on and off the past few months (which
have included a solid ten weeks of holiday), but have finally posted the
third
patch series, which I think should be pretty close to final, to the list
today.
git add / git commit / git remove ...
When I'm done, I can switch to master, merge the debian branch into it and use git-buildpackage to build the package.
Paul Wise just pointed me to
a very good explanation of the issue with non-free firmware files:
The source? No, not some ideologist, not even someone involved in Debian. It's a comment about an update of a firmware package in Fedora.Updated qlogic 2400 and 2500 firmware to 5.03.13. What does 5.03.13 do? No one knows, except for QLogic, and they're not telling. I asked, and they told me that information was only available under NDA. So, I encourage you to imagine what this firmware does, and the bugs it fixes. While you're at it, imagine a world where vendors release source code for their firmware.
char buffer[1000];
struct thingy *header;
header = (struct thingy *)buffer;
then it is time to run. I hope you do not depend on this software,
because it is a pure accident if this is doing anything at all.
While you can cast a char * to a struct, that is only allowed
if that memory actually was this struct (or one compatible, like a struct
with the same initial part and you are only accessing that part).
In this case it is obviously not (it's just an array of char),
so you might see bus errors or random values if the compiler does no
optimisations and you are on a architecture where alignment matters.
Or the compiler might optimize it to whatever it wants to, because the
C compiler is allowed to do everything with code like that.
The next problem is the one that post was about: You are not allowed
to access an array after its end. Something like
struct thingy
int magic;
char data[4];
means you may only access the first 4 bytes of data.
If you access more than that it may work now on your machine,
but it can stop tomorrow with the next revision of the compiler
or on another machine.
If you have a struct with a variable length data block, then you
can use the new C99 feature of char data[] or the old
gcc extension of char data[0]. Or you can use unions.
(Or in some case use the behaviour of structs with the same initial
parts).
If you use C code with undefined semantics then every new compiler
might break it with some optimisation.
There is often the tempting option of just using a slightly different
code that currently works. But in the not too distant future the compiler
(or even some processor) might again get some new optimisations and the
code will break again. Fixing it properly might be harder but it's less
likely it will fail to compile again and it also reduces the chances that
it will not fail to compile but simply do something you did not expect.
After hearing several times, that it would make sense to use fibre cables
for your Christmas
tree, as you can illuminate it with them, I have been pointed to traceable
network
cords... which made me speechless...
This guy is very known by people who use to walk around the Paulista Avenue at night. This week Gilberto Kassab mayor of S o Paulo authorized the local police to arrest him and all other artists in order to replace them by one more crap christmas tree playing those well known depressed songs. SAD :_(
The bug webinterface of the
Ultimate Debian Database
currently knows about the following release critical bugs:
| In Total: | 655 |
|---|---|
| Affecting Squeeze: | 204 |
| Squeeze only: | 56 |
| Remaining to be fixed in Squeeze: | 148 |
| Pending in Squeeze: | 8 |
|---|---|
| Patched in Squeeze: | 30 |
| Duplicates in Squeeze: | 15 |
| Can be fixed in a security Update: | 17 |
| Contrib or non-free in Squeeze: | 4 |
| Claimed in Squeeze: | 2 |
| Delayed in Squeeze: | 5 |
| Otherwise fixed in Squeeze: | 21 |
Squeezereleased. However, with the view of the Release Managers, 156 need to be dealt with for the release to happen. Please see
Interpreting the release critical bug statisticsfor an explanation of the different numbers.
In the last years, I have seen many people try to use dpkg --build to create Debian packages. Indeed, if you look up dpkg s and dpkg-deb s manual pages, this option seems to be what you have to use:
And indeed, dpkg-deb is what ultimately creates the .deb files (aka binary packages). But it s a low-level tool that you should not call yourself. If you want to properly package a new software, you should rather create a Debian source package that will transform upstream source code into policy-compliant binary packages. Creating a source package also involves preparing a directory tree (but with a debian sub-directory), it s probably more complicated than calling-b, --build directory [archive directory]Creates a debian archive from the filesystem tree stored indirectory.directorymust have a DEBIAN subdirectory, which contains the control information files such as the control file itself. This directory will not appear in the binary package s filesystem archive, but instead the files in it will be put in the binary package s control information area.
dpkg -b on a manually crafted directory. But the result is much more versatile: the tools used bring value by dynamically analyzing/modifying the files within your package (for example, the dependencies on C libraries that your package needs are automatically inserted).
If this is news to you, you might want to check out the New Maintainers Guide and the Debian Policy.
Found it useful? Be sure to not miss other packaging tips (or lessons), click here to subscribe to my free newsletter and get new articles by email.
10 comments Liked this article? Click here. My blog is Flattr-enabled.
Next.