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
;

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

xfce4-screenshooter keyboard shortcut

sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...