[M7IM][COM] Developer notes about php, mysql and ubuntu


Quick and easy image hosting

Posted by admin

Fully responsive imagestash image hosting where you can use any device you wish.  Upload one or more images at one time and share it. The free account got 500mb of image storage which is enough for quick sharing of own images. Upgrade and get several gigabytes of storage and bandwidth. Use if myself for hosting of private images. Direct link to signup.


Get sizes of directories

Posted by admin

du -sh will list directories combined size without subdirs

Filed under: Uncategorized No Comments

mount a ntfs partition

Posted by admin

mount a ntfs partion to linux

First create new dir eg:

sudo mkdir external

location the new drive with:

sudo fdisk -l

then mount the new drive:

sudo mount -t ntfs-3g /dev/sdc1 /media/external
Tagged as: , , No Comments

Consolari remote logging service

Posted by admin

Consolari is open for users. The initial testing fase is over and I have opened the signup form for users. Consolari is a remote logging service which accept POST data through a REST api. Basicly it allows you to log any simple data type eg. strings, arrays, sql and xml data. Internal datatypes like tables is also supported and gives a nice view of data from a database.

The console allows you to send data from any host once you have obtained a API key.

Read more of Consolari here

I'm working on some helper libs and first one is a generic php version: https://github.com/m7internet/consolari-php-helper

Future helpers will be added for CakePHP and Drupal and then later for Ruby on Rails


Backup remote database quickly

Posted by admin

Quick cmd to backup a remote database locally without storing data on remote server:

ssh -C user@host "mysqldump --lock-tables=false -uuser -ppass --compress database-name | gzip -9 -c" > backup.sql.gz

It uses compression to speedup the data transfer

Tagged as: , , No Comments

Linux: list count of files, dirs or sym links

Posted by admin

ls -l | grep ^- | wc -l

ls -l | grep ^d | wc -l

ls -l | grep ^l | wc -l

Tagged as: , No Comments

Linux: count files in dir

Posted by admin

Usefull cmd for counting files in a dir:

ls "path" | wc -l

If a specific files should be counted this works as well:

ls "path/filename_*" | wc -l

Tagged as: , No Comments


Posted by admin

quickly check if the host is reponding to the port:

nmap -PN -p80 www.hostname.com

Tagged as: , No Comments

OpenConnect VPN client.

Posted by admin

usefull for vpn connections

OpenConnect VPN client..

Tagged as: , No Comments


Posted by admin

Growl noticfication interface to test listnerrs in phpunit


Tagged as: , No Comments