Tuesday, November 15, 2016

BREW - clean update / upgrade

Another one for future reference: brew
when I did brew update I've used to get:

>brew update
error: Your local changes to the following files would be overwritten by merge:


fix for that is:

cd `brew --prefix`
git fetch origin 
git reset --hard origin/master

if reset didn't work sometimes you need to do sudo, just make sure you change owner back to your user...

sudo chown -R user .

then :

brew update
brew upgrade

and all is nice and working cool ...  again ;-)

Monday, November 14, 2016

R - upgrade all packages

  • How to upgrade R?

There is this package, which you can use .... but you must have it installed before new version of R come ;-) - otherwise it is typical "catch 22":
Upgrade from 3.3.1  to 3.3.2 :
install.packages('installr', repos = 'http://cran.us.r-project.org') 
Warning message: 
package ‘installr’ is not available (for R version 3.3.1)

So basically - instead this go to https://cran.r-project.org/ and update using new R.

  • How to upgrade all your existing R packages (libraries)?

Use this command to upgrade all existing packages:

  pkgs = as.data.frame(installed.packages(.libPaths()[1]), stringsAsFactors=FALSE)$Package,
  type = 'source'
And quick update - to the article ;-) - use this instead:

update.packages(ask = FALSE, dependencies = c('Suggests'))

Have a fun! 

Wednesday, April 6, 2016

Mac OS X - switch off discrete GPU in apps

Hi - just quick one.
I have this program (WriteApp) which is quite cool, but every time I'm using it, it is automatically switching my mac into discrete graphics card mode. This app is not really into anything fancy/ high graphics dependent.
But when I launch Activity Monitor it is displayed as: "Requires High Perf GPU" - which means that my app spur the system to keep the advanced graphics processor active, and thereby drain battery life.

After some research ... I didn't find any solution apart using gfxCardStatus to permanently switch into "Integrated only" mode.

So ... there is a hack:
Open your app contents and inside them should be Info.plist file. Open it and add those 4 lines:


restart your app... and now - no more forcing into discrete mode.

Web 3 - blockchain layers

Layers from a blockchain perspective. My plan is to write 5 articles:  1 Intro: Web 1.. 2.. 3.. 2 Layers in crypto.  [this one] 3 Applicatio...