Saturday, November 29, 2014

How to increase virtualbox disk size

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\Users\pedro\VirtualBox VMs\ubuntu mate 14.10\ubuntu mate 14.10.vdi" --resize 102400

Thursday, October 30, 2014

Fortinet linux

http://noc.intermax.nl/downloads/fortinet/

Run the command
chmod +x forticlientsslvpn
Install necessary 32bit libraries (copy and paste commands below).
sudo apt-get install ia32-libs-gtk && sudo apt-get install libgtk2.0-0:i386
Make sure xterm is installed
sudo apt-get install xterm
Run forticlientsslvpn
sudo ./forticlientsslvpn

Monday, October 13, 2014

Save MySQL query results into a CSV file

SELECT order_id,product_name,qty FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

Tuesday, August 12, 2014

Retrieving the last record in each group

select *
from comment as m1
left join comment as m2  on ( m1.id<m2.id and m1.vulnerability_id=m2.vulnerability_id)
where m2.id is null
;

Wednesday, July 02, 2014

Install / upgrade to the latest Whisker Menu in Xubuntu or Linux Mint

The Whisker Menu PPA was updated to the latest 1.4.0 version recently and you can use to both upgrade to the latest version obviously, as well as to install the tool in (X)Ubuntu versions for which Whisker Menu isn't available in the official repositories (supported versions: Ubuntu 14.04, 13.10 and 12.04 and the corresponding Linux Mint versions).

Note: I've only tested the latest Whisker Menu 1.4.0 in Xubuntu 14.04.

To add the Whisker Menu PPA and install / update the application, use the following commands:

sudo add-apt-repository ppa:gottcode/gcppa
sudo apt-get update
sudo apt-get install xfce4-whiskermenu-plugin



If you've already had an older Whisker Menu version installed, you'll also need to restart the Xfce panel (or log out and log back in) to get the latest version:

xfce4-panel --restart

Monday, June 02, 2014

run npm command gives error "/usr/bin/env: node: No such file or directory"

I've found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so "ln -s /usr/bin/nodejs /usr/bin/node"

Tuesday, May 06, 2014

What's whoopsie?

How do I disable it on a server or via the command-line?

- Just change the report_crashes parameter to false in the
/etc/default/whoopsie

- Then bid farewell to whoopsie with
sudo service whoopsie stop

Friday, February 14, 2014

How to install xdebug in xubuntu

sudo apt-get install php5-dev php-pear
sudo pecl install xdebug


find / -name 'xdebug.so' 2> /dev/null

sudo gedit /etc/php5/apache2/php.ini
 

zend_extension="/usr/lib/php5/20121212/xdebug.so"
sudo /etc/init.d/apache2 restart

Wednesday, February 12, 2014

How to mount an ISO file in ubuntu?

Maybe, instead of installing additional software, you can use what the system has to this end: Create a directory to serve as the mount ...