Everything You’ve Been Taught About How To Read a Book Is Wrong

the main role of reading is improving your model of the world to more accurately reflect reality so that you can make better decisions.

The reason for reading a book is not to be able to spit back facts at a cocktail party — it’s to shape the way you think.

From https://taylorpearson.me/howtoreadabook/

Advertisements

Hack into your flow

“The average business person spends less than 5% of their day in flow. If you could increase that to 15%, overall workplace productivity would double,”

“The brain can’t tell the difference between physical consequences and emotional risk,” says Kotler. “Taking social risks is the same as physical risks.”

“In Silicon Valley, the idea is to fail fast or fail forward,” he says. “If you’re not giving employees space to fail, you’re not giving them space to risk. Move fast and break things. Engage in rapid experimentation. High consequences will drive flow and you get further faster.”

From https://www.fastcompany.com/3031052/how-to-hack-into-your-flow-state-and-quintuple-your-productivity

Splitting zsh config due multi host usage

This week while copying some of my dotfiles (due vim and zsh configuration) to a new remote host (dedicated server) of a new client I had to remove the private stuff (mainly aliases) from my .zshrc. Only now did the muse hit me to split the file and leverage the source (import, require, include) functionality.

So I moved the host specific and private stuff from .zshrc and added the following 2 lines after source $ZSH/oh-my-zsh.sh:

[ -f .zshrc_priv ] && source .zshrc_priv
[ -f .zshrc_host ] && source .zshrc_host

After editing .zshrc and moving some lines into .zshrc_priv and .zshrc_host I also commented the files header to be reminded about their purpose in the future 😀

# .zshrc_priv
# Sourced by .zshrc
# Private settings due public version control

alias vps='TERM=xterm-256color autossh -M 0 mike@vps' # host vps set in .ssh/config
alias vps_tunnel='autossh -f -M 0 -T -N -R 10022:localhost:22 mike@vps'
# .zshrc_host
# Sourced by .zshrc
# Host specific settings

export PATH="/usr/local/opt/node@6/bin:$PATH

Next I gonna separate some vim plugin specific code, too, to have a copyable (Plug & Play) config.

Three practically painless ways to expand your network — ideas.ted.com

You’ve worked out an efficient way of living your life, but you end up seeing the same people because they’re also following their own routines. Why not make your network slightly more inefficient? Go to a bathroom on a different floor, get your morning coffee from a different place, park in a different spot. You should encounter a new network of people.

Another way we get stuck in ruts is through filtering. We do this automatically and immediately. The minute we meet someone, we look at them and decide “You’re interesting” or “You’re not interesting” or “You’re relevant” or “You’re not relevant.”

When someone recently did something for you, did you just reply with a “Thank you,” “thx” or “ty”? Next time, say “Let me know if I can ever help you” or “I look forward to collaborating again.” Sentences like these can reinforce our ties with other people.

via Three practically painless ways to expand your network — ideas.ted.com

SQL to get WooCommerce product categories (terms)

For an import script I needed to get WooCommerce product categories so I ended up looking the generated query in /var/log/mysql/query.log for get_the_terms($postID, ‘taxonomy_name’)

I ended up using the following SQL query to get product categories:

SELECT t.*, tt.*
FROM wp_terms AS t 
INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id 
INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy IN ('product_cat') AND tr.object_id IN (11448)