Open Chrome, go to the website to test, and then hit Ctrl+Shift+J Ctrl+Shift+M On Mac: Command+Shift+J Command+Shift+M Then you can select your device, orientation, etc. I work as a freelancer, so if you don’t want to do that kind of… Read More
Blog
How to search for changed content in git history?
Run this: $ git grep REGEXP `git rev-list –all` I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a line to hire me.
How to use swaks to send a test email?
Swaks can be downloaded here . Example command line to send a test email: ./swaks –auth \ –server smtp.mailgun.org \ –au USERNAME@YOUR_DOMAIN_NAME \ –ap YOUR_PASSWORD \ –from USERNAME@YOUR_DOMAIN_NAME \ –to bar@example.com \ –h-Subject: "This is a test email" \ –body… Read More
How to redirect all stdout/stderr to syslog?
An easy way to redirect all stdout/stderr of a given process to syslog is to do the following in a bash script: exec 1> >(logger -t MYTAG) 2>&1 Please note this only works with bash as this is a bash… Read More
Jinja2: How to iterate over a dictionary?
{% for key, value in MYDICT.items() %} … {% endfor %} I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a line to hire… Read More
How to fix login issues with a password-less root MySQL user?
If you installed MySQL without a root password, you will have difficulties to login as root. For example, you need to sudo first, and can’t login as a regular user. The solution to this problem is to create a new… Read More
How to install a Debian package non-interactively when it requires user input?
Install the required package once manually, going through the configuration options you want. Then, do the following: $ sudo apt install debconf-utils $ sudo debconf-get-selections | grep MYPKG > MYPKG.CONF To be able to re-install MYPKG to a new machine… Read More
How to generate a comma-separated list in Jinja2?
From a list directly: {{ somelist|join(",") }} From a list of objects: {% for x in somelist %}{{ x.xyz }}{% if not loop.last %},{% endif %}{% endfor %} I work as a freelancer, so if you don’t want or don’t… Read More