You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
David Pennington
xeoncross
Full stack Go, Typescript, and Python developer. Mostly React UI's with Go & NodeJS backends (using Python for NLP).
https://keybase.io/davidpennington
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using DNSMasq as a caching nameserver & add in a malware etc blocking
Assuming a Properly configured DNSMasq
a quickstart for dnsmasq is given at the end if you have not set it up yet.
something like this will add a great regularly updated malware file for it to use. More security and privacy to you!
Specifically, this uses https://github.com/StevenBlack/hosts Choose one of the Raw Hosts file from there to use.
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First of all, please note that token expiration and revoking are two different things.
Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
1. How to hadle JWT expiration
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is in-depth guide how to install a Caddy web server as service, that running from regular unprivileged user.
How to install and configure Caddy, a modern web server, running as a service on CentOS 6.8. You will also obtain a free SSL-Certificate for a website automatically.
This is in-depth guide how to install a modern web server named Caddy as service, that running from regular unprivileged user. You will also obtain a Free SSL-Certificate for a Website automatically.
Why Caddy?
Apache and Nginx are the two most common web servers in the world. Apache is a classical solution, but due to it's memory consumption (because to it's nature of creating a new process for each request) we will leave it for another occasion. Nginx is very fast and the RAM consumption is very-very low, if we need to serve static pages. But Nginx's configuration is not to easy read and understand, this is why we will try more flexible and clear solution, which is more intended for newbies.
Caddy is written is Go, open-source and pretty fast web server. If you're looking for low-memory solution the Cadd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters