Mother of All Demos

Douglas Engelbart & The Mother of All Demos In 1968, after 4 years of research and development Douglas Engelbart first demonstrated several of the technologies that would go on to affect our everyday life. He conceptualized the first computer mouse, which was then constructed by Bill English. He and his team demonstrated the first graphical user interfaces, chorded keyboards, bitmap (graphical) display monitors, hypertext, as well as showcasing many other recent innovations in technology.

powerline

EDIT: This post is modified from the original. Mostly readability improvements and changes necessitated by the new layout and backend engine. It has not been updated for the latest Powerline as I have long since switched to Airline. While tweaking my configs, including fleshing out my .tmux.config and fixing bugs in my .vimrc I ran an update on my vim plugins. That’s when I noticed something was horribly wrong. Powerline wasn’t working anymore.

Access Growl's log on OSX

Open a terminal and drop this in: touch ~/Library/Logs/Growl.log defaults write com.Growl.GrowlHelperApp GrowlLoggingEnabled -bool YES defaults write com.Growl.GrowlHelperApp GrowlLogType 1 defaults write com.Growl.GrowlHelperApp "Custom log history 1" $HOME/Library/Logs/Growl.log Then you’ll find the log file at $HOME/Library/Logs/Growl.log and you can parse it or do whatever, like display messages on your desktop with GeekTools or something. :A

Killing SSH

HOWTO: Kill an SSH Session gleaned from cyberciti.biz Kill Hung SSH Session Often I’m using SSH and my connection drops, or I close my laptop and it disconnects from the wifi. When I get back to my SSH sessions, its locked and unresponsive. Eventually it will time out, but it takes a while. Enter: SSH Escape Characters. They only work immediately after a newline, and all start with a tilde. The disconnect character is the period (or dot).

Postgres on OSX issues

So I was running into this obnoxious error: psql: FATAL: role "postgres" does not exist No matter what I did. It basically means that the user is missing. So I had to create the user by hand. First I initialized the database as my current user: initdb -D /usr/local/pgsql/data And then I made sure the daemon was running: postgres -D /usr/local/pgsql/data >logfile 2>&1 & Then I opened a postgres terminal: psql template1 And created the postgres user: create user postgres with password ''; Finally, I gave the postgres user superuser privileges so it can create databases and whatever in my development environment.

OSX-like Natural Scrolling on Windows

one-cheekymonkey.blogspot.com Reverse Mouse Scroll Direction I’m going to forget this next time it happens, so I’m putting here for posterity. Navigate to HKEY\_LOCAL\_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\HID, and look for an entry that resembles VID\_… Open the Device Parameters key under each child entry and reverse the boolean value for the FlipFlopWheel. These days I use FlipFlip.exe (see below) which automates all this for me. This is still useful for knowing how it works and how it fix it manually.

Things Startups Need

http://nonchalantrepreneur.com/ Things Startups Do and Don't Need Things startups do need Sunny office Windows that open Democratically controlled music system Two forms of internet access Beer on fridays EVDO cards Video game system Good coffee maker Proximity to public transportation Proximity to park Heating that goes all night Health care plans…

Fuck Make

Make, Colons, and Paths: A Journey Through Hell tl;dr: If you use timestamps on your deploys, make sure they don’t contain colons or make will explode. Including Ruby extensions. We were running into this error while running bundle install on Ubuntu: /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for ffi.h... no checking for ffi.h in /usr/local/include... no checking for rb_thread_blocking_region()... yes checking for ruby_native_thread_p()... yes checking for rb_thread_call_with_gvl()... yes creating extconf.h creating Makefile make Makefile:158: *** target pattern contains no `%'.

Completely remove Xcode from OSX Lion

First you want to try running this: sudo /Developer/Library/uninstall-devtools -mode=all sudo rm -rf /Developer Repeat above for any other directories beginning with Developer in your root directory. For some reason I had two: Developer and Developer-3.2.6. Some systems may have a /Library/Developer/Shared directory also, so make sure you check for that directory, it will have its own uninstall-devtools script. After that delete the install app (this will make sure the AppStore knows its been uninstalled): sudo rm -rf /Applications/Install Xcode.app Some people may also find deleting the AppStore cache helps, but only do this if the above doesn’t work, remember to replace “your username” with the actual directory name: sudo rm -rf /Library/Caches sudo rm -rf /User/your username/Library/Caches/com.apple.appstore Done!

Rails on Heroku

EDIT: I no longer recommend Heroku. Heroku is a great tool to deploy your applications to the cloud. Heroku is free for small applications, and scales up very easily. It also removes a lot of the hassles of production configuration and deployment so you can get in there and code. Prerequisites You must have a Heroku account. You’ll need an initialized git repo for your app. Your app will need to have the pg and heroku gems installed.

Client-Side Storage

I’m resurrecting an old project of mine now that technology has caught up. Even so, it’s amazing how much time I’ve had to spend just trying to find the right tools to use to fulfill my requirements. Requirements Cross-Browser: Needs to work in every modern browser, including mobile. Persistant offline storage: In order to support all browsers I must also support the following technologies: IndexedDB WebSQL localStorage Some fallback if none of the above are available..

deep inspect

Been working a good chunk of the day with analyzing Ruby objects in Pry, and realized I needed more information. So I wrote a module that can be included on Object that recursively inspects the internal structure of objects. Output of RSpec::Rails.contents above. I’ve since renamed the method, but the output is very similar. Take a look at the code up on Gist. gist.github.com introspection ⦂∀

CMDR

github.com cmdr EDIT: This post has been modified from its original form. This is just an idea, its not even a “thing” yet, but here’s some of the ideas that have been stewing in my skull for some time now. Prior Art Before even glancing at this project, check out Pry, Rubbish, and Rush. Pry in particular in incredible. For the moment I have rather different goals though. Background So here’s the deal, years ago I read about the new fancy-shmancy Monad.

IRB & OSX DELETE

EDIT: I mean forward-delete not backspace. This is function+delete on my MacBook and the standard delete key in the navigation cluster on my shiny Das Keyboard. Its been driving me nuts. The delete key doesn’t work in IRB (or Pry) on OSX! Anyway, today I took a couple of minutes and tried this: brew install readline rvm install 1.9.2 --with-readline-dir=/usr/local/Cellar/readline/6.2.1 It works now. That’s seriously all I had to do. No patching required!

Support from your Peers

Support from your peers is something you need to earn by looking at what’s important to them. The person that is showing you resistance may have a great idea you can help facilitate and quickly he goes from rival to ally. I would like to add that being an effective leader will directly depend on how you are received at the peer level today and earning their respect is essential. Blake Thomas in an interview with Maria Dubov at MMD and a good friend of mine.

Pixen vs Seashore and Firefox vs Chrome

So I was just playing with some ideas to create my own Tumblr theme, an I noticed a few differences between the above mentioned applications. This isn’t a debate about which is better, this is just a couple of oddities I’ve noticed. Pixen vs Seashore These are very different applications and I’m using them for very specific tasks, which one may be better suited for than the other. Pixen When you save a GIF, it automatically assumes an alpha channel.

RTFM: cd

Okay maybe this is just me, but I have never been inclined to look up the man page for the cd command before today. But when I did, I found two things of interest: $OLDPWD : is set by the system when you use cd, it contains the path you last cded from cd - : shorthand for cd $OLDPWD It’s pretty simple but here’s a usage example on OSX: ~/Projects/config $ cd /Applications /Applications $ rm -rf Firefox.app /Applications $ cd - /Users/acook/Projects/config ~/Projects/config $ git status # On branch master nothing to commit (working directory clean) ~/Projects/config $ cd - /Applications $ So its really just an easy way to swap back and forth between directories, easier than using popd and pushd, which only let you swap once.

Rails 3.1 Beta & Compass

I put together a new Rails application to try out the new version of Rails, and during the course of testing it I came across an odd problem.. My pages were unstyled. Checking Chrome’s devtools, I noticed the CSS files were all 404ing. Chrome and Rails obviously knew what the files were supposed to be. But they just weren’t where they were supposed to be. Background I set up my environment with the following gems (besides the defaults): haml-rails compass acts-as-taggable-on rdiscount acts_as_markup closure_tree devise and the development/testing gems: rspec-rails rr factory_girl_rails wirble rails3-generators ruby-debug19 Probing the Innards After encountering the error I checked my git status and it told me the files were being created in public/stylesheets - the old path, rather than the shiny new public/assets of the Rails 3.1 Asset Pipeline.

Throwing money at the problem

Making your Life Easier by Throwing Money at the Problem Okay, first off, throwing money at your problems isn’t usually the solution (unless your problems are unpaid bills, then its very effective). However, its surprising how much difference a little thing here and there can make. I’m talking of course about power cables. “Power cables?!” Right. Power cables. I have a laptop I use for work, it’s a great little shiny 13" 2.7ghz MacBook Pro.

arbitrary revision

Just a quick tip. Do you want to look at a file in a different branch where tests are passing to see if the problem is in that file? Or maybe you want to rollback a change in git to a particular previous version? It’s easy, once you have the commit SHA: git checkout <sha> /path/to/file.rb Done! ⦂∀

RVM knows my name

Today I was updating rvm and it said my name. And I wondered how it knew? Was it psychic? Were they watching me, right now, outside my office window?? No, its just this: name=$(git config user.name 2>/dev/null) ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"} Fun! ⦂∀

iPad2

My Life with the Thrill Kill iPad Kult So I’m going to spend the next week or so with an iPad2 and try to use it wherever I can. Unfortunately there’s no official Tumblr app for iPad, only the iPhone one, and that is not really adequate. So I’ll see what else there is and try that out. Of note is that I’ve never had an iTunes/Apple account before. I’m very annoyed that they force you to supply credit card information for it, which is one of the reasons why I never did before.

diffstat

I started writing a little bash script like this: echo lines removed git diff|ack "^\- "|wc -l echo lines added git diff|ack "^\+ "|wc -l I named it diffstat. Then I googled, and found out there’s a program of the same name already in existence! And it’s already installed on my machine, so now all I need to do is git diff|diffstat and I get really nice output! ~/Projects/someproject.com on development ?

Semantic CSS Strategies

Testing this: has_classes [:payment, :error] instead of: /This is a payment error/ good for: functionals AND cucumbers CSS like: div.payment.error instead of: div.payment-error element contains many tests could be functionals which run much faster, rather than cucumbers cucumbers are domain specific for flows and user stories, not for seeing if the application is functional CSS structure 1 application.sass: variables and includes layout.sass: height, width, border-width, margins, padding, float, etc color.sass: color, background-color, background-image, border-color, etc font.sass: font-family, font-size, font-weight, etc effects.sass: webkit and css3 shadows and crap pros: – colors, font, and layout will change independantly – elements with large amounts of styles tend to lack any sort of internal order – quick and easy to combine into a single file using SASS include – easier to maintain internal structure cons: – an element may have up to 4 entries (layout, color, fonts, and effects) CSS structure 2 global.sass account_index.sass order_payment.sass etc..

Rails webserver research

Summary Unicorn’s deployment strategy is superior to Passenger’s, it allows upgrades of application code and even of the Unicorn binary itself without downtime. Oh yeah, and its also faster and uses less memory than passenger. Nninx seems to be easier to configure and its purported to be faster and use less memory than apache. Side notes Thin is great for serving up tiny, fast requests, and has better memory usage than anything else.

"Lessons Learned" by Devver

Learning From Failed Startups EDIT:This is excerpted from Devver's blog for posterity. we were hesitant to ask for feedback and help. We quickly found that people are incredibly helpful and generous with their time. Users were willing to take a chance and use our products while giving us valuable feedback. Fellow Rubyists gave us ideas and helped us with technical problems. Mentors made time for meetings and introduced us to others who could assist us.

GitX

github.com GitX This codebase combines a lot of awesome features from several forks of GitX and I use it almost every day. There’s a binary build in the download section packaged up in a DMG and ready to play with. Key features: Auto-reloading of repos when they change File history Blame Syntax hilighting of files In addition to the features of GitX that have been around a while: Browsable file hierarchies as they existed per commit Graphical branching and commit history Merge local and remote branches Add and fetch remote repositories Partial-file (patch level) staging and discarding Diff between commits, branches, repos, staged and unstaged files Write commit messages and commit changes Keep in mind that I’m not an Objective-C developer, and I only made minor tweaks and judgement calls on what features to keep between forks when I merged them.

Living Social security holes

content excerpted from deepgreencrystals.com AKA the importance of server-side validation. Ok, I am in the software business and all software has bugs. Some software has more bugs than others. Some software is just simply poorly designed. Especially in areas where the application at first blush is pretty simple and anyone can hack one together in a weekend. Sometimes these hacked together weekend projects take off and become wildly popular. That is when you suddenly realize the value of professional software engineers (or not).

Living in a Cave

themomorohoax.com Are you Living in a Cave? Too many startup people act like they are sitting in a cave inventing something utterly new. Chances are, they’re not. I constantly find myself amazed when I recommend a blog post, or a tactic to someone and they are like “Oh, that’s just what I need! I never thought to search for that.” Even more amazing is when someone labors day and night trying to figure out how to make a successful app yet has never heard of something like a/b testing.

Cukeplusplus

github.com cukeplusplus I was dissatisfied with existing Cucumber formatters and spent a few hours figuring out the API and dismantling the Pretty formatter in order to create this. Cukeplusplus is inspired by the easy to read colorized output of Emerge, Gentoo’s package manager. It has no dependancies other than Cucumber itself, and I’m kind of in love with how it looks on my terminal. Honestly the code is a mess, it was written during a 32-hour coding session and my primary goal was useful output in the fastest time possible.

IRB & iTerm

If you’re like me, you use irb for all kinds of things. From just running quick ruby experiments to figuring out how many days (9364) you’ve been alive. I created a bookmark in iTerm to run irb when I hit ⌘-control-0. This was fine until I realized it was using the system’s ruby install, and not the version I installed with RVM. I eventually realized the problem was the system environment doesn’t know about my .bash_profile, and therefore my modified PATH variable nor the require RVM magic.

OSX /etc/hosts timeouts

OSX: 5 second timeout for domains defined in /etc/hosts This is mostly for my own reference, this document has been sitting in my drafts folder since … like two years ago. First of all, OSX claims .local for Bonjour and will treat them differently, so use .dev or something instead. To add a host called myapp.dev and point it to localhost, just do this: sudo dscl localhost -create /Local/Default/Hosts/mydev.dev IPAddress 127.0.0.1 To see all the currently defined hosts and their IPs: sudo dscl localhost -list /Local/Default/Hosts IPAddress And to remove a host: sudo dscl localhost -delete /Local/Default/Hosts/mydev.dev if you declare both a IPv4 and IPv6 address in /etc/hosts for a .dev domain like so: 27.0.0.1 myapp.dev ::1 myapp.dev Then it should work correctly.