Skip to content

Instantly share code, notes, and snippets.

View ismaelrh's full-sized avatar
🎯
Focusing

Ismael Rodríguez ismaelrh

🎯
Focusing
View GitHub Profile
@ismaelrh
ismaelrh / vbox.md
Last active January 17, 2018 13:28
Solve freezing of Ubuntu 16.04 (kernel 4.13.0-26) with VBox

Fixing freeze at startup - VBox

After last Ubuntu 16.04 kernel update (4.13.0-26), Virtual Box stopped working correctly. When starting a virtual machine, the host stops completely. Here are the steps to solve it.

  1. Remove any previous virtualbox installation (VM's are kept): sudo apt-get remove virtualbox virtualbox-5.1
  2. Remove virtualbox-dkms: sudo apt-get remove virtualbox-dkms
  3. Add the Oracle repository
After last Ubuntu 16.04 kernel update, Virtual Box stopped working correctly. When starting a virtual machine, the host stops completely.
Here are the steps to solve it.
1. Remove any previous virtualbox installation (VM's are kept): `sudo apt-get remove virtualbox virtualbox-5.1`
2. Add the Oracle repository
@ismaelrh
ismaelrh / javascript_functions_closures.js
Created September 22, 2015 22:19
Function and closure tests on Javascript.
/*
* 1. Prueba básica Closure
*/
//La función valueStore sirve para crear un closure que almacena la variable 'value'.
//Devuelve una función que puede usarse para acceder a ese valor. La variable queda oculta.
function valueStore(value){
return function(){return value;}
}
@ismaelrh
ismaelrh / javascript_functional.js
Last active September 15, 2015 23:01
Some functional programming operations implemented in Javascript (Yes, I know that JS has these functions already implemented).
/** Map function **/
//Map function
//values = array of values to be mapped
//func = function to apply
function map(values,func){
return map_aux(values,func,[]);
}
//Auxiliar function, for immersion