Mathias’s dotfiles

Esta persona Mathias, ha publicado en github, sus ficheros .* de configuracion de diferentes herramientas:

  • fichero de configuracion de gitconfig
  • fichero de configuracion de basrc
  • fichero de configuracion de vim
  • fichero de configuracion de wget

De momento lleva algo mas de 9.000 «stars» en GitHub. la verdad es que la consola a colores esta muy bien, asi como los alias. Aunque no no me voy a acordar de todos.

Mathias’s dotfiles

brew + cask

Cuando vas a formatear tu mac, es útil tener un script que te instale los programas habituales, en lugar de ir a la página web, descargarlos y guardarlos en Aplicaciones.

Dentro de brew, hay una aplicación que se encarga de instalar programas como Google Chrome o el navegador anónimo Tor. Se llama cask.

En este enlace esta la informacion de como se usa.

Un ejemplo de script de instalacion de varios programas.

brew + cask

Install brew

ruby -e "$(curl -fsSL"

The command curl with options:
-f, –fail
(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal cases when an HTTP
server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and
return error 22.

This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401
and 407).

-L, –location
(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will
make curl redo the request on the new place. If used together with -i, –include or -I, –head, headers from all requested pages will be shown. When authentication is used,
curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won’t be able to intercept the user+password. See also –location-
trusted on how to change this. You can limit the amount of redirects to follow by using the –max-redirs option.

When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or
303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method.

-s, –silent
Silent or quiet mode. Don’t show progress meter or error messages. Makes Curl mute.

-S, –show-error
When used with -s it makes curl show an error message if it fails.

rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
MacBook-Pro-de-Jose:~ jmprieto$ ruby -e "$(curl -fsSL"
==> This script will install:
==> The following directories will be made group writable:
==> The following directories will have their group set to admin:

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/include /usr/local/lib /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/include /usr/local/lib
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 189633, done.
remote: Compressing objects: 100% (51766/51766), done.
remote: Total 189633 (delta 136736), reused 189572 (delta 136694)
Receiving objects: 100% (189633/189633), 37.81 MiB | 2.62 MiB/s, done.
Resolving deltas: 100% (136736/136736), done.
 * [new branch]      master     -> origin/master
HEAD is now at 5d4034d utils: use the $stderr global variable.
==> Installation successful!
==> Next steps
Run `brew doctor` before you install anything
Run `brew help` to get started
Install brew