Monday, 29 November 2021

composer and docker docker-compose


image: composer:latest
container_name: fantise_composer
- ./src:/var/www/html
working_dir: /var/www/html
- php
- fantise

image: node:13.7
container_name: fantise_npm
- ./src:/var/www/html
working_dir: /var/www/html
entrypoint: ['npm']
image: library/nginx:stable
container_name: fantise_nginx
- "61141:80"
- ./src:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- php
- mysql
server {
listen 80;
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.php?$query_string;


location ~ \.php$ {

try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fantise_php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;


Friday, 26 November 2021

List of cool linux things



Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
Screenshot 1

ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle, a file launcher that is good at automatically finding out which program to use for what file type.

trash cli

trash-cli trashes files recording the original path, deletion date, and permissions. It uses the same trashcan used by KDE, GNOME, and XFCE, but you can invoke it from the command line (and scripts).


sudo apt-get install ncdu
ncdu - Wikipedia



Command line interface for testing internet bandwidth using








Thursday, 20 April 2017

How to calculate if table rows are inserted consecutively in MySQL

As a Developer, I'm often working with asynchronous code, code that isn't well  synchronous be that with workers or events, sometimes this means the created time is out of order and to report on it we need to validate the created date time.

SELECT @a := 0;
SELECT invid, `date`, `date` - @a AS gap, @a := `date`
HAVING gap < 0

Monday, 20 March 2017

Linux Clipboard Text To Speech

Install festival and esound-clients.

To do so, follow this tutorial:

Install xsel:

sudo apt-get install xsel

Create new file in your home folder, call it "" or something.

nano ~/apps/

edit it and paste the following line:

xsel --clipboard | festival --tts

Make the script executable

cmod +x ~/apps/

Make the file executable make a hotkey that launches the shell script:


Rsync over proxy gcloud / jumpbox

So I needed to pushdown some log files off of a box without a public IP, rather then rsync to the jump box / proxy then  rsync to my local box i made use of the ssh proxy command.

 rsync -avz -e 'ssh -o ProxyCommand="ssh -i ~/.ssh/google_compute_engine -W my-internal-ip.internal:22"' my-internal-ip.internal:/var/www/log/workers ~/code/logs/

Wednesday, 27 April 2016

Cross Brouser Support For onPaste clipboardData

Some of the current browsers support a 'clipboardData' property as part of a paste event. This should allow you to query the different data formats created from the current data on the clipboard.

Safari and Chrome have the best support, but it is still incomplete. Firefox has no support if you discount using the XPCOM objects interface. The IE interface is older and only supports Text or URL data.

Firefox, Safari IE and Chrome all sanitize any HTML being pasted. Opera will only paste plain text so HTML sanitation is not an issue. Some earlier version of IE could cause some security issues as they copy hyper-links in full.

Try copying and pasting this paragraph and link into the box below.

Tuesday, 12 April 2016

Cold Fusion debuging with fiddler proxy [CFML]

Not a clue why i'm doing Cold Fusion today but I am and I needed to debug some shitty API

<cfhttp method="post" proxyport="8888" proxyserver="" result="resultHttp" throwonerror="false" url="#apiURL#">
            <cfhttpparam name="requestData" type="formfield" value="#requestData#"></cfhttpparam>