From mobile hacker Russell Beattie’s weblog post “Aw, gee… Apple doesn’t love those hacks“:
Like the codependent spouse of an abusive alcoholic, the Apple zealots just keep coming back for more.
Ok, enough Apple mashing for today.
|
Posted by
hexmode |
Categories:
Uncategorized | Tagged:
apple |
Only because a few of my friends use Mac “computers”:
“They strap you into a wheely chair and play In-A-Gadda-Da-Vida at 11 through headphones to you while administering electric shocks — until you renounce your faith.” “And they actually have places that do this sort of thing?” “Yeah, they’re everywhere. All you need is a place where no-one will notice a geek twitching, screaming and occasionally wetting themselves in front of a computer.” “In other words the gaming area of an internet cafe,” I say. “…And this works?” “Who cares?” the PFY says. “They’re filthy Mac users!”
(From BOFH: You think you know a guy… via Dan Lyke.)
|
Posted by
hexmode |
Categories:
Uncategorized |
Is it by chance that the noblest spiritual strivings in Christian tradition have all been redefined: faith is now vested in the power of money; hope resides in its transformative power, while charity means giving money, the coin in the box or the cheque in response to a natural disaster?
(from A rich man’s world)
|
Posted by
hexmode |
Categories:
Uncategorized |
Last night, David (who long ago earned his own TLA of “dcm”), told me some of his ideas for improving the battery life script that I wrote up. “Yeah,” I said, “just wait until I put it on Launchpad and then you can file bugs against it.” Now it is on Launchpad, but there doesn’t appear to be an easy way to file bugs against it. I guess I would have to set up a separate project — something I’m not sure I’m ready to do yet. A lot of this should be merged, somehow, into GNOME Power Manager and some already is. For now, just email me or post a comment here if you want something from it. Still, there should be an easy way to turn off wifi, for example, without an using external kill switch. I should mention how much I like Bazaar since it is what Launchpad uses to mirror the source code. Yes, mirror. I can host the source on Launchpad itself, but since I prefer to “own” my own code, I like to have it hosted on my own server and mirrored elsewhere. Actually, the main repository is on my laptop and I just push a copy of that to my server, which Launchpad then mirrors. All these layers of indirection aren’t the most space-efficient way to get things done — Bazaar is distributed — but they create a lot of redundancy, which I like when dealing with production code. Of course, this isn’t a concern when dealing with a couple of scripts, but it for larger projects. Since I’m using Launchpad, I pretty much have to use bzr. And, while it may be a little immature compared to other DVCS out there, I’m very pleased with it. For my ITP’d debian packages, I’m using bzr-builddeb where I can and svn-buildpackage where I can’t. For me, the killer feature of bzr is the ease of putting your code under version control and then, later, publishing it if you like. That Launchpad is willing to mirror it and build multi-arch packages for it makes bzr all the more attractive.
|
Posted by
hexmode |
Categories:
Uncategorized |
I know some people who read my weblog entertain fantasies about publishing a book. Say you get your wish and someone publishes your book. But then it doesn’t sell. And no one wants to buy the stock from the publisher. What then? Real Live Preacher tells us.
|
Posted by
hexmode |
Categories:
Uncategorized |
When I saw Harald Sitter’s post about longer battery life on Linux, I decided to give it a try. Especially since, at the time, he hadn’t posted his script. Here is what I came up with:
#!/bin/sh # powertop says beagle takes up a lot of power killall beagled ############################################### # http://www.lesswatts.org/tips/disks.php # Disks! ############################################### # I don't need no stinkin' atime sudo mount -o remount,noatime / # Laptop mode works by submitting all future pending disk IO (such as # pending VM cache writebacks as described in the VM writeback time tip) # at once when the kernel has to do an IO to the disk for any reason sudo sh -c 'echo 5 > /proc/sys/vm/laptop_mode' # Only write to disk every 15s - we have a battery and few crashes. sudo sh -c 'echo 1500 > /proc/sys/vm/dirty_writeback_centisecs' # Turn on power management after 1 minute for i in `echo /dev/sd?`; do [ -e $i ] && sudo hdparm -B 1 -S 12 $i done # Turn off cdrom polling for i in `echo /dev/scd?`; do [ -e $i ] && sudo hal-disable-polling --device $i done ############################################### # http://www.lesswatts.org/tips/wireless.php # Wireless! ############################################### # WiFi power saving sudo iwpriv eth1 set_power 5 # turn off bluetooth sudo /etc/init.d/bluetooth stop sudo modprobe -r rfcomm sudo modprobe -r l2cap sudo modprobe -r bluetooth ############################################### # http://www.lesswatts.org/tips/cpu.php # CPU! ############################################### # Enable the power-aware SMP scheduler sudo sh -c 'echo 1 > /sys/devices/system/cpu/sched_mc_power_savings' ############################################### # http://www.lesswatts.org/tips/ethernet.php # Ethernet! ############################################### # turn off gigabit ethernet sudo ethtool -s eth0 autoneg off speed 100 # turn of WOL sudo ethtool -s eth0 wol d ############################################### # http://www.lesswatts.org/tips/graphics.php # Graphics/Video! ############################################### # turn the LCD backlight down to 12% # I found that xbacklight only works for certain values on my x60 xbacklight -set 12 # Turn off screen aff after 2minutes xset +dpms xset dpms 0 0 120 ############################################### # http://www.lesswatts.org/tips/misc.php # Misc! ############################################### # Turn on audio power saving if [ -e /sys/module/snd_hda_intel/parameters/power_save ]; then sudo sh -c 'echo 10 > /sys/module/snd_hda_intel/parameters/power_save' fi if [ -e /sys/module/snd_ac97_codec/parameters/power_save ]; then sudo sh -c 'echo 1 > /sys/module/snd_ac97_codec/parameters/power_save' sudo sh -c 'echo 1 > /dev/dsp' fi
Of course, you’ll want something to turn everything back on when you get back on power:
#!/bin/sh # Turn Beagle back on! beagled& # Turn off wifi powersaving sudo iwpriv eth1 set_power 6 # Write to disk more often sudo sh -c 'echo 300 > /proc/sys/vm/dirty_writeback_centisecs' # Disable the power-aware SMP scheduler sudo sh -c 'echo 0 > /sys/devices/system/cpu/sched_mc_power_savings' # turn on bluetooth sudo modprobe bluetooth sudo /etc/init.d/bluetooth start # turn on gigabit ethernet sudo ethtool -s eth0 autoneg on speed 100 # turn the LCD backlight up xbacklight -set 100 # Turn off screen aff after 30 minutes xset +dpms xset dpms 0 0 1800 # Turn on cdrom polling for i in `echo /dev/scd?`; do [ -e $i ] && sudo hal-enable-polling --device $i done
Note that I don’t reverse every step in my power-saving script. Just most of them.
|
Posted by
hexmode |
Categories:
Uncategorized |
Now that Emacs has encryption functions built-in (previously, an external library had to be added), you can use GnuPG to keep all your sensitive data secret. Still, there isn’t an easy way to tell Emacs to treat a whole file as encrypted. So I rewrote mc-gpg-file-mode.el from emacswiki to use the built-in emacs functions. Here it is (non-colorized version on emacswiki):
(defvar pgg-gpg-user-id "YOUR-ID-HERE") (autoload 'pgg-make-temp-file "pgg" "PGG") (autoload 'pgg-gpg-decrypt-region "pgg-gpg" "PGG GnuPG") (define-generic-mode 'gpg-file-mode (list ?#) nil nil '(".gpg\\'" ".gpg-encrypted\\'") (list (lambda () (add-hook 'before-save-hook (lambda () (let ((pgg-output-buffer (current-buffer))) (pgg-gpg-encrypt-region (point-min) (point-max) (list pgg-gpg-user-id)))) nil t) (add-hook 'after-save-hook (lambda () (let ((pgg-output-buffer (current-buffer))) (pgg-gpg-decrypt-region (point-min) (point-max))) (set-buffer-modified-p nil) (auto-save-mode nil)) nil t) (let ((pgg-output-buffer (current-buffer))) (pgg-gpg-decrypt-region (point-min) (point-max))) (auto-save-mode nil) (set-buffer-modified-p nil))) "Mode for gpg encrypted files")
|
Posted by
hexmode |
Categories:
Uncategorized |
For the past month or so, I’ve been doing some consulting with IntraHealth. We’re about to release a sizable webapp under the GPLv3 and one of the tasks is adding the proper headers to the files. Oh, of note, the Free Software Foundation has entered the age of the web. Instead of telling you to “write to the FSF at…”, if you need a copy of the full license, you are told to visit http://www.gnu.org/licenses/. Anyway, there seems to be a real lack of tools to help with this. Sure, there is this ruby script from Xavier Hanin, a one off and, finally, this Perl script. None of these supports PHP. So I grabbed the Perl script, made a couple of changes to add support for the GPLv3 and PHP. Here it is. The tool could really use a lot of improvement. More file types, more licenses, better detection, etc. But, for now, it’ll do.
|
Posted by
hexmode |
Categories:
Uncategorized |
Since I frequent places that regularly post links advocating the Gold Standard, What if a Golden Meteorite Hit the Earth? Introductory books for laypeople
|
Posted by
hexmode |
Categories:
Uncategorized |