Tuesday, August 16, 2022

The 5 Temptations of a CEO

 Just read this book. Being in business, every so often you hear a quote of Patrick Lencioni's other book, The 5 Dysfunctions of a Team. So I decided to give this book a try. 

Aside from having to get through some examples which any individual CEO may or may not identify with, the book makes a solid case behind each of its points. Perhaps a bit of an oversimplification of things at times, but hey, what CEO wouldn't like a things to be a little simpler than it sounds. 

Being a CEO is tough, and often such guides make our never-ending stream of decisions sound like we've overcomplicated things ourselves. That said, after reading, I did write down his 5 "temptations" on my dashboard for quick reference :)


 The Five Temptations of a CEO: Lencioni, Patrick M.: 9780787944339:  Amazon.com: Books

Friday, February 27, 2015

Heroku Scheduler Logs

See which processes are running, and note the number after 'scheduler'.

$heroku ps

Then view the log, replacing '123' with your number (--tail if you want more than just the last few lines).

$heroku logs --ps scheduler.123 --tail You can pipe that to a file $heroku logs --ps scheduler.123 --tail > log/scheduler.log

Or pipe and also view the output in your terminal window at the same time (note the vertical pipe character).

  $heroku logs --ps scheduler.123 --tail | tee log/scheduler.log

Thursday, February 26, 2015

Heroku Postgres Database - Backup and load into development environment

Create a new backup, expire the oldest one at the same time.

$heroku pgbackups:capture --expire

Download the backup to your local file folder

$curl -o latest.dump `heroku pgbackups:url`

Lastly, override your local development db (replacing username and dbname below)

$pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] -d [dbname] latest.dump

Friday, March 7, 2014

Git Command Line Basics

Here is a sample workflow, not meant as a complete tutorial, but rather a clean, solid workflow that should get you up and working with Git from the command line in no time.

Setting It Up

If you haven't already, go to Github.com and create a repository for your project (e.g., 'my_project').

Navigate to your project folder, and make sure you know where you are first!:
Tip: replace 'my_projects' and 'my_project' with your own details
Tip: you don't need to type the '$'
Tip: '#' indicates lines generated by your terminal, not typed by you
$ cd ~/my_projects/my_project
$ pwd
# /Users/you/my_projects/my_project

Set your git credentials if you haven't already, then initialize an empty repository for your project:
$ git config --global user.name "Your Name"
$ git config --global user.email your.email@example.com
$ git init

# Initialized empty Git repository in /Users/you/my_projects/my_project/.git/

Add your github.com origin, and if you want, see your origin settings with either of the following two commands:
Tip: replace 'username' and 'repository' with your own details
$ git remote add origin https://github.com//.git
$ git remote show origin
* remote origin   
  Fetch URL: git@github.com:you/my_project.git  
  Push  URL: git@github.com:you/my_project.git  
  HEAD branch: master
  Remote branches
$ git remote -v
# origin https://github.com/you/my_project.git (fetch)
# origin https://github.com/you/my_project.git (push)

If your files are on your desktop, push them up as your master branch:
$ git push -u origin master

Or, if you want to pull down the current version of a remote repository:
$ git pull

If, when trying to pull down the remote repository, you get a message that you have uncommitted changes locally (preventing you from 'fast-forwarding'), you can either dump the changes on your local machine:


$ git reset --hard
$ git pull
or, you can 'stash' those changes for the time being, pull down the remote repository, then re-'apply' those changes:


$ git stash
$ git checkout -b newStuff
$ git stash apply
$ git commit ...

Working

Create a new branch.  At any point you can also check to see what branch you are on (indicated by an '*'), and check your status:
$ git checkout -b my-working-branch 
Switched to a new branch 'my-working-branch ' 
$ git branch 
master 
my-working-branch 
$ git status 
# On branch my-working-branch 
nothing to commit, working directory clean

When you're ready, make sure git has all your new files and changes, then commit your changes to your working branch (with a special message):
$ git add .
$ git commit -m "this is pretty cool"

Switch back to the master branch, merge the working branch into the master branch, then delete the working branch:
$ git checkout master
$ git merge my-working-branch 
$ git branch -d my-working-branch
Tip: if you messed up your working branch and want to abandon it, skip the 'merge' step and use a capital "-D" when deleting the working-branch. 

Push your changes up to Github.com, and you're done! 
$ git push


_____ Update: if you're having problems with Gemfile.lock, try:
git reset HEAD -- Gemfile.lock
git checkout Gemfile.lock

Friday, January 25, 2013

Cheapest Jelly Bean Phone


Want a phone that has (or will have) Android Jelly Bean? They're still pretty expensive.  Looking at rough prices, for unlocked or no-contract devices:

Nexus 4: $300
Nexus 7: $200
Nexus 10: $400
Galaxy S III: $575
Galaxy S II: $420
S Advance: $300
Ace 2: $270
Ace Plus: $222
Galaxy Note: $520






Galaxy Note 2: $710
Galaxy Nexus: $460
Nexus S: $420
One X: $470
One X+: $650
Xperia T: $500
Xperia TX: $480
Xperia V: $500
Droid Razr M:
Razr HD: ?
Razr Maxx HD: ?
Atrix HD: $420
Electrify M:
Xoom: $325
Optimus LTE II: ?

More phones will eventually get the upgrade I'm sure, but right now it looks like the cheapest option is the Nexus 7, though it isn't a phone.  At least you'll get all the features of Jelly Bean.


Monday, September 27, 2010

Google Music in Gmail Chat?

Curious little bug in my Gmail.  When using the labs feature that shows an Android icon for friends who are on chat on Android phones...their name disappears.

The curious part:  hover your mouse over the name, and an "Invited" and a beamed note appears on the right...smells like a social music service is coming.

Wednesday, September 15, 2010

IE9 Beta - Battle of the "chrome"

Before Google's Chrome browser was released, "chrome" meant something different.  In browsers, it meant the borders and widgets around the web page itself.

I've heard a lot of chest thumping by Microsoft regarding how much IE9 gets out of the way.  So, I did a comparison of the chrome myself in the picture below.  Check out the red line I drew.

From left-to-right, the browsers are:


Guess what?  They're right.  Not only is more of the page visible, but also the title of the page and other controls have disappeared.  I am a dedicated Chrome user at the moment, but I may have to rethink my loyalty.