I managed to get a custom Devise strategy with LDAP working, but had no clear way of automating tests. I wanted to validate if I still had to keep the password fresh in the database, and needed to be able to write scenarios around that in case someone attempted to refactor out the code. After […]
Monthly Archives: May 2015
Kentucky Lottery Pick 3 Expected Payout
The expected payouts for the Kentucky Lottery Pick 3 game have an interesting idiosyncrasy. Playing the special “Straight Box” play pays out better than a separate 50¢ straight and 50¢ box play. All other plays average 60¢ per dollar played, but the straight box seems to be 65¢ and 70¢, depending on the numbers played. […]
devise_ldap_authentication for your domain email on top of database_authenticatable
I have a devise user model named LoginUser whose authentication key is :login. I want normal users of the system to be database_authenticatable. However, I want to be able to authenticate previously added users via internal LDAP. Furthermore, I didn’t want the underlying database_authenticatable password to be used or to expire on me (also using devise_security_extensions). […]
One Year In: Prius 2014 Gas Mileage + Thule Carrier + Road Trip
The Prius has definitely been a very geeky car to play around with and figure out. It’s been fun to see how various environments and driving styles impact it. My initial driving in the summer of last year yielded about 42.9 MPG. This was in stop-and-go traffic, but often stopped long enough that the engine […]