You can use wscat
:
sudo apt-get install node-ws
#
wscat -c ws://echo.websocket.org
connected (press CTRL+C to quit)
> foo
< foo
> bar
< bar
>
Related cards:
swaks - Swiss Army Knife SMTP, the all-purpose smtp transaction tester
swaks is a very nice tool to test SMTP. For the most linux distributions you can easily install it with your package management system.
This example send an email from from@example.com
to `to@example.c...
HowTo apply Test Driven Development to Container Images
Apply Test Driven Development(TDD) to the process of building container images by defining test before writing code and automate the testing process. Iterate through the TDD cycle while developing and running the tests later in continuous integrat...
netfilter's Connection Tracking system (nf_conntrack)
What is netfilter's Connection Tracking system?
The connection tracking system often referenced as nf_conntrack
is part of the Netfilter framework. It allows the ...
memcached: retreive connection information
How to retrieve connection information from memcached.
printf "stats\nquit\n" | nc 127.0.0.1 $MEMCACHED_PORT | grep connection
Measure HTTP Connection times (TTFB) with curl
To measure the time of your HTTP request with curl, you can use the -w
(--write-out
) option:
curl --silent -o /dev/null -w "%{time_connect};%{time_starttransfer};%{time_total};%{time_appconnect};%{time_pretransfer}\n" https://example.org
...
GitLab: Test Mailing from the Rails Console
Open a console
sudo gitlab-rails console
Note
This takes some minutes to start
Send a mail
Use the following command on the rails console to send an email.
Notify.test_email('destination_email@address.com', 'Messa...
HowTo: Curl applications that are usually behind reverse proxies with TLS termination without the application redirecting to https schema
A lot of web applications require being called over https
, which is a good thing. It's possible to configure this requirement at the web- or proxy server level, where nginx
or apache
will just redirect every request on http
to https
. Som...
Useful PostgreSQL commands
on the bash (issued as postgres user)
Start/Stop/Restart PostgreSQL
pg_ctl -D $configdir start|stop|restart
Start/Stop/Restart the corresponding PostgreSQL using the given configuration directory. The configuration directory sh...
manual haproxy backend failover
If you want to perform a failover on another haproxy backend server this is the way you should do it:
Gather information
Via hatop
Note: Please mind that the names of frontends / backends / servers are only examples. Mind this when yo...
Set a fixed PGAPPNAME when using PgBouncer in transaction mode
When you are using PgBouncer with e.g. a Ruby on Rails application which uses different application_name
s for the PostgreSQL connection (for Puma, Sidekiq, Cronjobs, ...) PgBouncer will set the application name accordingly on each statement whic...