Curl oneliner to show headers and discard contents
Posted by arj on February 14th, 2011. Posted under: Technical stuffBecause I keep forgetting.
curl -D - -o /dev/null -s URL
Because I keep forgetting.
curl -D - -o /dev/null -s URL
Using the mouse to click twice on the “switch view” button to switch between the “all” and “favorite” view was getting a bit annoying, so it was time to add a shortcut to http://kb.mozillazine.org/Keyconfig_extension:_Thunderbird .
Plenty of solutions for different plugins were suggested, mostly using loadFolderView, but that one does not work (anymore?).
So for my future reference mostly:
gFolderTreeView.mode = gFolderTreeView.mode == "all" ? "favorite" : "all"
toggles between “all” and “favorite” mail, don’t forget to check the “global” option when adding this to keyconfig. This is of course easy to adapt to switch between “Recent Folders”, “Smart Folders” and “Unread Folders”
Out of general laziness I’ve been using quite a lot of gnome on ubuntu instead of fluxbox. One of the little things I got used to on fluxbox is resizing windows dragging the right mouse button while holding the alt-button(another one is easy borderless windows for stuff like mplayer). Gnome can do this too, but only by clicking the middle mouse button (mouse wheel), I don’t even dare to get used to this to prevent accidental pastes. Unfortunately which button does what is unconfigurable with Gnome (I’ve been told Linus Torvalds has been ranting on Gnome for this recently), so telling it to resize on a right click is impossible. Read the rest of this entry »
Mainly for my own future reference:
using this wireless adapter with the ndiswrapper in Ubuntu 6.10 makes the system freeze. However, at least revision 2104 from https://svn.sourceforge.net/svnroot/ndiswrapper/trunk/ndiswrapper works fine.
After upgrading from ubuntu dapper to edgy everything seemed to be working fine, except for the vmware server console. This displayed the usual error message vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
After this error the program used to start just fine, but after the upgrade it didn’t do anything besides taking 99% of cpu time. Lots of pages mention troubles running Edgy inside a Vmware virtual machine, but not too many report this error.
http://www.debian-administration.org/users/emeitner/weblog/6
mentions a solution to this problem on a beta version of Edgy, and luckily it also works on the final version. So starting the console with LD_PRELOAD=/usr/lib/libdbus-1.so.3:$LD_PRELOAD vmware-server-console works just fine (and as mentioned in the thread on the vmware forums, removing the libpng12.so.0 from the vmware-server-console/lib directory got rid of the innocent error message about the version information also). If this is the only thing that broke with the upgrade, I’m a happy user.
Installing patches on Solaris 10 seems to take ages. When I was installing a couple of them recently, an interesting process showed up when I used ps to see what it was upto exactly.
/usr/bin/wc -c /usr/jdk/instances/jdk1.5.0/jre/lib/rt.jar, apparently, rather than using the obvious way of asking the filesystem for the size of a certain file, the file is read and the bytes are counted. On other systems (freebsd, debian) wc cheats by just getting the file size from the system if only “-c” is given, but on solaris it obviously does not
There are probably plenty of other reasons why patching takes a long time, but this certainly doesn’t speed up things
Oh, and the patch fixing recent sendmail vulnerabilities also took the liberty of overwriting the config files with default ones
Habbie made a nice patch for aterm 0.4.2 to change the font size with the mouse-wheel (http://blog.dataloss.nl/perma/aterm-scrollwheel-fontsize-support/). Aterm has since then reached version 1.0.0 already, but luckily the patch still applied cleanly. Building a patched Ubuntu package also went smoothly, replace 0.4.2 with 1.0.0 in the .patch file and ./debian/rules binary did the trick. For the lazy ones or the people that don’t want to install all the building crap (compilers, debian package creation software) here’s a package (note: if you don’t trust me, don’t download and install this, but build it yourself
). The files are here:
aterm_1.0.0-1scrollwheel-1_i386.deb, aterm-ml_1.0.0-1scrollwheel-1_i386.deb
Note that I only changed the version number a bit, so once the repositories carry something newer they probably will overwrite this package.
Because somehow (;)) search engines link here for search queries involving arj and solaris, I decided I might as well put something helpful up here.
The http://arj.sourceforge.net/ software compiled fine for me on solaris 10. That is, it produced a running binary, didn’t have any .arj files to test it on. With gcc it compiled “out of the box”, for the sun studio compiler (http://www.sun.com/software/products/studio/index.xml) some tweaks had to be done. Some gnu specific stuff had to be removed/replaced in the autoconf files (-G instead of -shared1, some stuff on strip’ing and -fPIC). To achieve this change the DLL and LD directives on solaris in gnu/configure.in. So CFLAGS="-DSUNOS -D_UNIX" should stay in place, DLL_CFLAGS and LD_STRIP set to "", and change DLL_FLAGS to not contain the GNUism -shared, DLL_FLAGS="-G" (patch here: http://blog.bz2.nl/files/arj-solaris-cc.patch).
Alternatively, if you just want to download a binary package, see the blastwave solaris package community for an older version of arj.
1) this caused the not immediately obvious error from ld that “-h” could not be specified together with some other option, cc tried to parse the -shared as -s -h -a -r -e -d
For future reference, if you get “This kernel requires the NetBSD boot loader” when booting NetBSD sparc64 (on a Ultra5 in my case) with a fresh (newer than 20060131 probably) kernel, you should’ve read /usr/src/UPDATING more carefully
They changed some stuff around, so you need to do
# cd src/sys/arch/sparc/stand/ofwboot
# make USETOOLS=never
# cp ofwboot /
before rebooting into your new kernel (also see the netbsd-sparc64 mailinglist). And yes this is documented in /usr/src/UPDATING, but the actual error wasn’t mentioned anywhere yet so here we go.
So what we learned today: actually do read UPDATING before updating
Deciding that eth2.42 (the default naming scheme for a 802.1q vlan interface) looked silly, I used /sbin/ip to give it a better name:
/sbin/ip link set dev eth2.42 name vlan42
After this, I noticed the vlan42 device showed up in /proc and sysctl with the tunable parameters like other interfaces; sysctl uses “.” as a delimiter so eth2.42 didn’t get listed. So not only my interfaces look nicer now, they can be tuned (mostly arp related stuff) now too! And there are other pieces of software too that don’t accept a “.” in an interface name, so this should help there as well.