Skip to content

Instantly share code, notes, and snippets.

Raffaello /
Last active October 9, 2017 15:23
VirtualBox recompiling kernel with Secure Boot.
openssl req -new -x509 -newkey rsa:2048 -keyout vbox.keyout -outform DER -out vbox.der -nodes -days 36500 -subj "/CN=VBoxDrv/"
mokutil --import vbox.der
### after the reboot yo are able to add it to the secure boot, please select it.
Raffaello / typo_suggestion.php
Last active April 16, 2016 23:35
typo suggestion
View typo_suggestion.php
function suggestion(array $words, $word)
$lev = [];
foreach ($words as $w) {
$lev[$w] = levenshtein($word, $w);
return array_search(min($lev), $lev, true);
#first download the packages from
# ---
sudo rpmbuild --rebuild log4shib-1.0.9-3.1.el6.src.rpm
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/liblog4shib1-1
sudo rpmbuild --rebuild xerces-c-3.1.2-3.1.el6.src.rpm
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/xerces-c-bin-3.1.2-3.1.amzn1.x86_64.rpm
sudo rpmbuild --rebuild xml-security-c-1.7.3-3.1.el6.src.rpm
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/xml-security-c-bin-1.7.3-3.1.amzn1.x86_64.rpm
sudo rpmbuild --rebuild curl-openssl-7.42.1-1.1.el6.src.rpm