06 Dec 2015
To remove old linux kernels and leave the current one
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Be aware, the command uses uname -r
to get the current kernel.
05 Jun 2015
Here we discus how to migrate the Subversion repository into a new Git repository.
We’ll do it with a handy git svn
utility. We will refer Gitlab/Github as the destination Git server.
Create a new project on Gitlab: https://\<gitlab-address\>/projects/new
and clone it into your local machine
git svn clone https://<svn-address>/<projectname>
cd <projectname>
git remote add origin git@gitlab.newentity.it:newentity-sas/<projectname>.git
git push -u origin master
Now backup your SVN
project folder
cp -raux <projectname> <projectname>.`date +'%Y%m%d'`
And remove .svn
folders
cd <projectname>
rm -rf `find . -type d -name .svn`
Init GIT
Config GIT
git config --global user.name "Full Name"
git config --global user.email "Email@example.com"
Check the remote url
git config remote.origin.url
Change the remote origin
git config remote.origin.url git@<gitlab-url>:<username>/<projectname>.git
Create a .gitignore
file
echo "<projectname>.sublime*" > .gitignore
Add files
Commit il progetto
git commit -m "init <projectname>"
[master 820fe97] init <projectname>
Pull and merge from remote
Push into remote
git push -u origin master
18 May 2015
The Apache web server of the version 2.4
introduces a new style for <VirtualHost>
configuration,
in particular the <Directory>
syntax is not compatible anymore with the previous one 2.2
.
The old styled configuration valid in the Apache <= 2.2
version
<VirtualHost *:80>
...
<Directory "/var/www/html/example.com/public">
Options MultiViews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
...
</VirtualHost>
the modification is introduced in the part
Order allow,deny
Allow from all
the new way to describe the access permitions is reduced to just one line
finally the correct <VirtualHost>
configuration will look like the following
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DirectoryIndex index.html index.php index.htm
DocumentRoot /var/www/html/example.com/public
<Directory "/var/www/html/example.com/public">
Options MultiViews FollowSymLinks
AllowOverride all
Require all granted
</Directory>
# Logfiles
ErrorLog /var/log/apache2/example.com/error.log
CustomLog /var/log/apache2/example.com/access.log combined
</VirtualHost>
20 Apr 2015
If you get this sudden error in the fail2ban.log
2015-04-20 11:13:17,722 fail2ban.jail : INFO Jail 'apache-honeypot' started
2015-04-20 11:13:17,739 fail2ban.actions.action: ERROR iptables -N fail2ban-apache-honeypot
iptables -A fail2ban-apache-honeypot -j RETURN
iptables -I INPUT -p tcp -m multiport --dports apache-honeypot -j fail2ban-apache-honeypot returned 200
most likely you have spotted the character length limitation on the chain name.
I’ve discovered that the limit is 16
for the chain name length, but Fail2Ban prefixes it with fail2ban-
string
which eats so precious 9
characters so the only 7
remaining.
To solve this issue you need to rename the iptables
action to something like name=HONEY
$ cat /etc/fail2ban/jail.conf
[apache-honeypot]
enabled = enable
filter = apache-honeypot
action = iptables-allports[name=HONEY, protocol=all]
logpath = /var/log/asterisk/full
maxretry = 3
bantime = 600
Thas it! The issue is observed on Fail2Ban ver. 0.8
or older.
10 Apr 2015
Star
Fork
The Matlab script implementations of Elliptic integrals of three types, Jacobi’s elliptic functions and Jacobi theta functions of four types.
The main GOAL of the project is to provide the natural Matlab scripts WITHOUT external library calls like Maple and others. All scripts are developed to accept tensors as arguments and almost all of them have their complex versions. Performance and complete control on the execution are the main features.

Star
Fork
Email2DB parses the email schema into the relational schema. It supports major SQL engines: MySQL, PostgreSQL, Microsoft SQL server and MongoDB support will be rolled down latter.

Star
Fork
This is a public space for thoughts on MySQL and PostgreSQL. Ceph’s Storage clustering and KVM virtualization. Programming with NodeJS and PHP. Hacking with RaspberryPI and Arduino. Please feel free to modify any text in it.
