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:

share/doc/homebrew/Acceptable-Formulae.md
share/doc/homebrew/Bottles.md
share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md
share/doc/homebrew/Brew-Test-Bot.md
share/doc/homebrew/C++-Standard-Libraries.md
share/doc/homebrew/Common-Issues-for-Core-Contributors.md
share/doc/homebrew/Common-Issues.md
share/doc/homebrew/Custom-GCC-and-cross-compilers.md
share/doc/homebrew/External-Commands.md
share/doc/homebrew/FAQ.md
[......]

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:

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

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

Have a fun! 

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...