DIVID Technology Riffraff & Whatnot

by Kevin Bassham, Web Interface Developer

Seasoned writer reviews 3 mechanical keyboards

Found an interesting review of three mechanical keyboards from the perspective of a seasoned writer, and how he quickly becomes an enthusiast. More of this can be found if you look for it, but I wanted to share this for any of you who haven’t tried a clicky keyboard. He outlines his discovery and likes/dislikes, and includes one of my favorite keyboards, the AEKII.

More: Shawn Blanc’s Review

Purging an item from Git History

Here’s a quick and dirty way to clean particular items from Git history. In our case it was large files that were being scattered throughout capistrano deployments. We symlinked the folder and now treat it as content, and all is well. I read about a project called git-annex that I want to look into further that may be better suited for handling large files.

$: git filter-branch -d /dev/shm/scratch –index-filter “git rm –cached -f –ignore-unmatch ‘filename.ext‘; –tag-name-filter cat — –all
$: git push –force –all

Conversation Threading

If you find Apple Mail using high CPU because of conversation threading, either turn off “include related messages” or try archiving old messages. You can make a smart mailbox for old mails, then choose export mailbox. Before you archived messages from mail, you should be able to set your account settings so the archived messages stay on the server. Also remember, it’s always good to have a system backup to prevent loss of important data, just in case.

PastedGraphic-1.png

Rails 3 Asset Pipeline FTW

dhh-deal-with-it
courtesy @lautis

Working with the Rails 3.2.1 has been a great experience for me, but not everyone shares this sentiment. Here are some interesting insights from Rob Connery about the state of things after the Rails 3 dust settled regarding the asset pipeline. I share this because, in short, I agree and believe upgrade struggles are likely well worth it. Users ultimately benefit, and I appreciate the rails team pushing Rails engineering in this direction.
http://wekeroad.com/2012/01/12/understanding-the-rails-asset-pipeline/

Give dynamic pager the day off

201202091000.jpgIf and only if you have enough memory (>8gb), you can experiment with disabling virtual memory to prevent swap paging. Beware, after doing this, overallocating memory by running too many memory-intensive apps could cause a system halt. You have been warned.

 

 

Terminal command:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Coda Webkit Nightly

Have you ever wanted to run the nightly version of Webkit inside Coda? This used to be possible with an app called CodaKit, but it no longer works in OS X 10.7, so I made a quick replacement in automator.

http://dividtechnology.com/filechute/CodaKit.rar

(Bear in mind, this won’t do much if you don’t already have both Coda and Webkit nightly installed.)

IPFW Firewall

undercover.png On a mac or linux computer, there’s a server-grade firewall that’s not enabled unless you elect to run it. Even the standard application firewall on a mac isn’t very robust in my opinion. So, for those of you who do use the unix ipfw firewall, this is a nice reference:
http://www.ibiblio.org/macsupport/ipfw/
http://www.ibiblio.org/macsupport/ipfw/firewall_2

Although it looks a bit outdated, there are good examples here, and I found it more intuitive to setup as a reductive ruleset rather than the more discombobulated output from rulesets in waterroof (which is a great tool, btw). This method is legible and less error-prone even without a GUI helper.

Alternatively, you can edit the waterroof startup script file directly and then reload it in waterroof to keep them in sync. Example:

/etc/firewallrules

add 00010 allow ip from any to any via lo*
#PING
add 00020 allow icmp from any to any icmptypes 0,3,11,12
#BONJOUR
add 00100 allow udp from any to 224.0.0.251 dst-port 5353
add 00200 allow udp from 224.0.0.251 to any dst-port 5353
add 00300 check-state
add 01000 allow tcp from me to any keep-state
add 01100 allow udp from me to any keep-state
#DNS
add 02110 allow udp from any to any 53 out
add 02120 allow udp from any 53 to any in
#DHCP
add 02130 allow udp from any 67 to any 1024-65535 in
add 02140 allow udp from any to any 68 in
#ME
add 03200 allow tcp from any to any out
#SSH
add 03300 allow tcp from 192.168.0.0/16 to me dst-port 22
#NETBIOS
add 03400 allow tcp from 192.168.0.0/16 to me dst-port 137
#SERVERS
add 03500 allow tcp from 192.168.0.0/16 to me dst-port 3000,3001
#LOCKS
add 04000 deny ip from 224.0.0.0/3 to any in
add 04100 deny ip from any to any in
add 05000 deny icmp from any to any in
add 06000 deny udp from any to any in
add 07000 deny tcp from any to 224.0.0.0/3 in
add 07100 deny tcp from any to any dst-port 0 in
add 07200 deny tcp from any to any established
add 07300 deny tcp from any to any in
add 65535 allow ip from any to any

/etc/firewallrules_v6

add 01000 allow ipv6 from any to any via lo*
add 01100 allow ipv6 from any to any out
add 01200 deny ipv6 from any to any

Revisiting “Best Practices”

Great piece on how and why we should review the current state of things as responsible web developers. Getting rusty – we need new best practices for a different development world

Mail Contact Photos for RSS

Mail 5 in Lion includes a view option to show contact photos in the message list. This is great for people, but what about RSS? Instead of a generic person icon, you can get something better. Create an Address Book contact with each feed author listed in the email block (they don’t have to be actual addresses). To find the rss author or group name, save a copy of a feed item and look for the “X-Mail-Rss-Source-Name” in the .eml file. Depending on the contact you setup, you may need to organize your feeds or smart mailboxes by conversation to see the result.

Screen Shot 2011-07-20 at 4.32.35 PM.PNG

Digital Color Meter in Lion

The Digital Color Meter utility in Mac OS X 10.7 no longer converts hex colors or copy to clipboard. The global utility color chooser palette does, and can be made more readily available. Just open Applescript Editor and type the words “choose color” and save as an application. Thanks to macosxhints for this tip.

http://hints.macworld.com/article.php?story=20060408050920158