Prize Linked Savings Account

Prize Linked Savings

Recently I heard an episode on Freakonomics podcast called “No-lose Lottery”. You can listen to the episode here

Apparently, this is a rebroadcast. Original episode was in 2010.

But those details aside, this post is to quickly summarize the concept of “Prize Linked Savings Account”

What is mix.lock file

In past, I have seen several processes create .lock files, to usually write pid of the process. e.g. Emacs desktop package creates .emacs.desktop.lock file to save the PID of the emacs instance that created this file. Eventually, it will use this to ensure that no other instance overwrites it, and also gives a warning as such. There have been other instances we well. So when I started working on elixir, I always ignored mix.

Change the default Screen shot location for macOS

By default, macOS saves all screenshots to the ~/Desktop. If you'd like screen shots to be saved somewhere else, you have to configure it manually from the terminal. For instance, if you'd like your screenshots to be saved in the ~/screenshots directory, then enter the following commands: 1 2 3 $ mkdir ~/screenshots $ defaults write com.apple.screencapture location ~/screenshots $ killall SystemUIServer source

SMTPAuthenticationError : 534

One of the website suddenly stopped sending emails from the “Contact Us” form My fellow engineer tried to debug the problem, but could not. so I stepped in. The first thing I tried was to verify that the username/password was correct, by logging into the gmail account via the browser. It was. So then I considered changing to TLS from SSL, but before I did that on production setup, I decided to do all the trials locally.

Create and update timestamp in DB

I have following defined in my sqlalchemy models file. 1 2 3 4 class CommonColumns(Base): __abstract__ = True _created = Column(DateTime, default=func.now()) _updated = Column(DateTime, default=func.now(), onupdate=func.now()) I then derive most of my classes from CommonColumns This automatically inserts the creation and updation timestamps for the each row. But this works for the records created via the python/sqlalchemy script using db.session.add(...) Recently I needed to quickly insert records directly from psql prompt.

Sense of completion in org-mode

If you use org-mode to keep track of your TODO lists, then this might be useful. Assuming you have tasks in an hierarchical manner, you should Put [/] and/or [%] in the header Use TODO keywords in the child node, as you normally would. When an entry is marked DONE, values are updated automatically. In case you need to update the values manually, do C-c C-c I needed this when I refiled the entries.

Cost of buying eve.com

In the “Tim Feriss show” podcast, Episode #248 : Ten commandments of Startup Success, there is a story about “Buying eve.com domain” Turns out this domain was owned by 5 year old girl named Eve Rogers. How does one negotiate with a 5 year old ? Luckily (?) the negotiations were with her mom, and the price of the deal was : Equity in the company (exact details not shared) (Observer) seat on the board of directors for the daughter (Eve Rogers) Multiple trips to Disney Land per year $50000 A funny little story worth sharing .