stolen from http://www.harshj.com/2007/02/06/configuring-the-broadcom-2045a-bluetooth-dongle-in-windows/ for personal reference (more…)
Screen size calculator
Today I found out I want to replace one of my 20″ 4:3 LCD screens with a widescreen, to watch movies on a bigger surface. However, I didn’t want to reduce my vertical screen space.
What I mean is that a 20″ widescreen is, necessarily, shorter vertically than my 4:3 screen, meaning I get to see less of vertically oriented webpages, word documents, spreadsheets… basically everything except movies are designed for a screen with a relatively large vertical size.
Thus, getting a 20″ widescreen was completely out of the question. So I grabbed my calculator, and then thought… why bother? Someone must have done this before.
Exactly. The link below provides a “TV Aspect Ratio Calculator”, which works just as well for LCD screens. Using 20″, 4:3 as input, my widescreen needs to be 24.5392 inches to fit my needs. Thus, we’re going for 26″ 🙂
ATX power connector pinout
For personal reference, this is where the damn pins go
How to move a mysql database from one box to another
Simple reference, moving a mysql database:
mysqldump -h <oldhostip/name> -u username -p[<password>] <databasename> > <dumpfilename>.sql mysql -u<username> -p[<password>] < <dumpfilename>.sql
Note: The lack of spaces in some places of the commands. They are intended.
Note: Specifying the password after -p is []’d, which means it’s optional.
Note: If you do enter a password on the command line, it will get saved in your .bash_history or similar in clear text.
GPG Error: The following signatures were invalid
debian-archive-keyring up to date? still get the error?
here’s a tip: try without a transparent proxy (i had to flush the cache on mine)
CIFS VFS No response for cmd n mid…
On a few systems, I’ve noticed CIFS mounts have a tendency to lock up the system when transferring large files, or a shitload of small ones in quick succession. When this happens, the system may or may not completely lock up, and lines like these will appear in your syslog:
Aug 1 22:58:16 dreadnought kernel: CIFS VFS: No response to cmd 46 mid 25661 Aug 1 22:58:16 dreadnought kernel: CIFS VFS: Send error in read = -11 Aug 1 22:58:16 dreadnought kernel: CIFS VFS: No response for cmd 50 mid 25664 Aug 1 22:58:16 dreadnought kernel: CIFS VFS: No response to cmd 47 mid 25663 Aug 1 22:58:20 dreadnought kernel: CIFS VFS: No response to cmd 47 mid 25662 Aug 1 22:58:20 dreadnought kernel: CIFS VFS: Write2 ret -11, written = 0 Aug 1 22:58:20 dreadnought kernel: CIFS VFS: Send error in read = -9 Aug 1 22:58:20 dreadnought kernel: CIFS VFS: Write2 ret -9, written = 0 Aug 1 22:59:52 dreadnought kernel: CIFS VFS: No writable handles for inode Aug 1 23:00:29 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:00:36 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:01:16 dreadnought kernel: CIFS VFS: No writable handles for inode Aug 1 23:02:28 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:03:23 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:03:44 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:05:35 dreadnought kernel: CIFS VFS: No writable handles for inode Aug 1 23:06:18 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:06:35 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:06:46 dreadnought kernel: CIFS VFS: No writable handles for inode Aug 1 23:06:46 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:07:02 dreadnought kernel: CIFS VFS: close with pending writes Aug 1 23:07:46 dreadnought kernel: CIFS VFS: server not responding
I found a workaround which involves disabling Opportunistic Locking. This will have a small performance impact, but at least the thing wont hang up and use 100% CPU for no goddamn reason. Yes, this article has an angry tone, because this issue has eaten way too much of my time today.
To disable Opportunistic Locking, you have to set the contents of the file “/proc/fs/cifs/OplockEnabled” to 0. This file only exists after the cifs module has been loaded, and will be replaced if the module is unloaded and reloaded. Thus, I configured my /etc/rc.local script (use whatever equivalent your distro has to a startup script) to both load the cifs module and set the contents of said file:
# cifs client workaround modprobe cifs echo 0 > /proc/fs/cifs/OplockEnabled
There you go.
Disable the “No mail” notification on machines which have no local mail
On machines which are set up to have no local mail and send all their messages to a smarthost, using e.g. exim4, the “No mail.” message at login is both unnecessary and annoying, because when things are set up correctly, there should never be any local mail in the first place.
This can be remedied by editing /etc/pam.d/ssh (or whichever file corresponds to the login method you’re using) and taking a look at the two following lines:
# Print the status of the user's mailbox upon successful login. session optional pam_mail.so standard noenv # [1]
It’s time to comment something out 🙂
Hardware clock fix for Debian on Mac Mini
On my Mac Mini, the hardware clock was seriously screwed up under Debian. The clock would set itself 1 hour back for each boot and cause all kinds of strange issues with cron when corrected. A small fix will remedy this situation.
- sudo vim /etc/init.d/hwclock.sh
- change ‘HWCLOCKPARS=‘ to ‘HWCLOCKPARS=”–directisa”‘ (note: that’s two dashes before directisa, even if your browser might put them together)
- On Debian Lenny, you have to do the same to the HWCLOCKPARS line in /etc/init.d/hwclockfirst.sh
Disable Debian’s motd on login
Tired of seeing this?
Linux ***** 2.6.18-6-686 #1 SMP Fri Jun 6 22:22:11 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: ***** from *****
Edit /etc/motd, remove everything in it, or ‘echo “” > /etc/motd‘
Then edit /etc/rcS.d/S55bootmisc.sh and comment out the two lines following “#Update motd“
Nifty linux oneliners
This is a list of nifty oneliners I often use and just as often forget. Now I have a place to jot them down. (more…)