How to block last history item in terminal on macOS
23 Nov 2023 - Sometimes I enter something in my terminal that could be painful when compromised. To fix that, GPT, the internet, and I created a function to delete the last item in my history.
23 Nov 2023 - Sometimes I enter something in my terminal that could be painful when compromised. To fix that, GPT, the internet, and I created a function to delete the last item in my history.
12 Sep 2023
- Using Docker can sometimes lead to an issue where all traffic routes through Docker via iptables, bypassing other layers such as NGINX. To mitigate this, you’ll need to introduce a specific rule in iptables targeting the DOCKER-USER
chain.
29 Nov 2022
- Create this file in your middleware folder called middleware/trailing-slash.global.js
:
05 Oct 2022 - What to do if you want a simple SVG loading circle. You can do it with a div in HTML, but the positioning of the element is always a bit annoying.
22 Jul 2022 - This might help others in their search for some email validator based on MX DNS records.
20 Dec 2021 - Want to paste a text into some place?
01 Dec 2021 - Sometimes you don’t want to wait for a JavaScript promise to resolve if it takes too long, just like this sentence.
08 Mar 2021 - When I am on a network that’s paid by the hour you want to disable your Wi-Fi when you are not using your mac. To do this I listen for when the mac goes to sleep and disable the Wi-Fi.
06 Feb 2021
- In Node.js the url.parse
API is deprecated. But one of the great things was getting an plain JavaScript object from your query params:
14 Jan 2021
- this.$refs
is undefined when the element with the ref
attribute is not visable at the moment you use the this.$refs
object. This costs me some time to figure out.
19 Dec 2020
- In the documentation of Docker it says to install the OS version with lsb_release -cs
. For me this returned focal
, but Docker does not have the release files for that version it seems.
19 Nov 2020 - Comparing an array with objects in JavaScript can be a bit annoying.
10 Nov 2020 - You can copy the entire dir /etc/letsencrypt/ and restore it on your new server.
16 Oct 2020
- When you installation crashed on load/save rf kill switch status /dev/rfkill watch
:
07 Jun 2020 - DNSCrypt Proxy is one of the tools build into the Algo VPN ansible scripts. It’s great for blocking ads and trackers. I run a privacy friendly analytics tool called Simple Analytics. For developing my tool I need to make sure it’s never blocked in my VPN.
29 May 2020 - When you have links on your page but you want to open them in a new tab (when visitors are navigating to another website).
14 Apr 2020 - In this guide I explain how to install Ubuntu Server 18.04.4 on a (bare metal) server with two disk in RAID 1 mode. You will loose all data on your server if you follow this guide. I will use a full disk encryption with dm-crypt. My hosting provider does not support EUFI so I used legacy BIOS to run the server. This means you can’t use disks larger than x TB. We will not use LUKS as it’s another layer of complexity to the server.
13 Feb 2020 - Let’s say you have an array with objects:
09 Oct 2019 - Sometimes you have to get a variable from a nested object like this
09 Jul 2019 - Firefox has a feature where they want you to register for. It’s Firefox Account. Sometimes called Firefox Sync. It’s something I don’t like to do, it’s a browser and it doesn’t need to know who I am. That’s why I disabled the Firefox Account feature including the button and tab in settings.
02 Jul 2019
- Python3 has a nice way of starting a server: python3 -m http.server 8080
. This works super nice, but I always forget how to type this command. So I created a little function in ~/.bash_profile
on my Mac:
26 Jun 2019
- When you use the <meta name="apple-mobile-web-app-capable" content="yes">
tag in your HTML the links in your app with open in a new tab in Safari. This is something you usually don’t want.
07 Feb 2019
- At my last job we needed a word or string which our customers could remember. It also should be generated automatically. While drawing our ideas on the drawing board we came up with a solution that seemed to work. Why not use a consonant followed by a vowel and repeat this for n
times.
30 Dec 2018 - In this blog post I will show you how you can get Telegram notifications from Stripe events. I did set it up for when somebody is a new user (first payment) and for when I get a payment. I use Node.js without any framework. Stripe does not send it’s user email address with the webhook payload so I grab that from my own PostgreSQL database.
29 Dec 2018
- When I setup crontab for a script I want to have all logging in syslog. This way I can see all live output of the script with a single command tail -n 100 -f /var/log/syslog
.
22 Dec 2018 - When I setup an NGINX server I have to setup custom error pages for every error. I want to show the error message on the page and not have a genenic “Something is wrong” error page. If customers complain about an error page it’s nice if they can communicate you the error code or message.
06 Nov 2018 - Often times when I login to a VPS I get this a message like this:
01 Nov 2018
-
UPDATE: I created a better blog post without the use of
eval
24 Sep 2018 - I got this message in by logs
20 May 2018 - When you want to submit a form programmatically the event submit does not get triggered. Here is how you can still trigger the submit event.
02 May 2018 - We probably have all been here
19 Apr 2018 - When I install my new Mac I do a few things to set it to my needs. Maybe you like those apps and settings and can use it as well. If I need more essentials, hit my up on X.
16 Jan 2018 - Apple added a great feature in Final Cut Pro X 10.4 called advanced color grading. With this feature you have color wheels where you can color grade the image in a similar way as in Adobe Premiere Pro. It also supports brightness and seturation levels.
10 Jul 2017
- I have some issues with getting async
and await
working inside of Promise
’s.
08 Feb 2017 - Sometimes you have to get a variable from a nested object like this
31 Oct 2016
- One morning I was running git status
. I got this ugly error message in my terminal:
02 Jul 2016
- With this details
-tag you can create foldable / collapsible content:
01 Jul 2016
- This cost me some minutes of my life. I was using display: flex
on a div
in my code with justify-content: space-between
:
30 Jun 2016
- With CSS you can do a lot of cool stuff like transform
and transition
. But you will still need JavaScript to add and remove classes to elements. In the code example you will see how to add classes to elements which are in the current viewport. It will not cover how to remove them later.
06 Jun 2016
- When you use the Find in folder-function of Sublime Text, you probaly hate the fact it is also searching in your node_modules
folder. There is a nice feature in Sublime Text where you can specify which folders to exclude from your search.
06 Jun 2016
- Maybe you want to have a logo with the same url showing something different on production and staging. Or you want to have different robots.txt
files because you don’t want to give robots permision on you non-production environment (like staging or acceptance).
21 May 2016
- Tiered of typing git branch --set-upstream awesome-branch origin/awesome-branch
?
20 Mar 2016 - A cool new service from The Netherlands is launched. It is called https://transfer.sh. With a simple command from the terminal you can send a file to their server. You will get a short url back and you can share it because it is online available.
11 Feb 2016
- Install this packages via CMD
+ SHIFT
+ P
> Install package
> Search for Pretty JSON
and install
.
03 Feb 2016 - I like to type short commands for commands I use very often. If you use Git, then you probably use that command a lot.
16 Dec 2015
- The JavaScript .replace()
function will only replace the first instance if you use just two strings like this:
14 Dec 2015 - If you have a shiny Mac as a front end developer or designer you will see your webpages in the most beautiful way. Everyone with such a nice display will see your website in the best possible way.
09 Nov 2015
- I have a crawler running for watiseropderadio.nl and I got some problems with setting up the crontabs for it. I have a node application with a simple node webserver and some other scripts which are runnable via npm run ...
. I deployed the app to a dokku server and it was running.
26 Oct 2015 -
22 Oct 2015
- In sass
or scss
you can use extend
-function to merge selectors together.
This is useful for some cases, but when you just want to define the styling on
two different selectors you maybe want a different behaviour.