Friday, 14 April 2023

Unified HTTP and WebSocket Security

Unified HTTP and WebSocket Security

Thanks to the HTTP/WebSocket unified security model, the following is a list of some standard HTTP security methods that can be applied to a WebSocket connection. Remember this is not something you get for free: each WebSocket gateway/server needs to implement any of these they consider important. (Kaazing’s Gateway supports all of them, and more.)


Wednesday, 15 March 2023

Force Mark all Read Gmaill

 


 

If you are thinking, how can I force mark all Read Gmaill? We can do this using Google scripts (app scripts ) allows us to automate tasks that we can't be bothered to do; I had a really fucking annoying notification of an old as fuck email, so I wanted to force them all into read.

Monday, 30 May 2022

So you want to make your own docker-compose for PHP/NPM ?


So you want to make your own docker-compose for PHP and NPM ? I know you do. But you don't want any more headaches, do you? Well, then, this tutorial is for you.


 

 

 

Friday, 26 November 2021

This is the list of cool and awesome Linux things.

This is the list of cool and awesome Linux things. Using these can improve your productivity and may even save your day occasionally. I'm sure you've heard of some of these before, so I'll keep it short; this is still a good primer if you're new to the Linux command line and looking for advice.

 

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`
FROM INVOICES AS i
HAVING gap < 0

Monday, 20 March 2017

Linux Clipboard Text To Speech

Install festival and esound-clients.

To do so, follow this tutorial: https://help.ubuntu.com/community/TextToSpeech

Install xsel:

sudo apt-get install xsel

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

nano ~/apps/clipboardtospeech.sh

edit it and paste the following line:

xsel --clipboard | festival --tts

Make the script executable

cmod +x ~/apps/clipboardtospeech.sh

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

~/apps/clipboardtospeech.sh 

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 proxxye.url.com -i ~/.ssh/google_compute_engine -W my-internal-ip.internal:22"' my-internal-ip.internal:/var/www/log/workers ~/code/logs/