templ is a great view framework but there is no clear documentation (as of writing) showing how to use it with the Echo web framework. This short guide should show you how to set it up:
Install templ and echo:
go get github.com/a-h/templ
# For more options and information see | |
# http://www.raspberrypi.org/documentation/configuration/config-txt.md | |
# Some settings may impact device functionality. See link above for details | |
# uncomment if you get no picture on HDMI for a default "safe" mode | |
#hdmi_safe=1 | |
# uncomment this if your display has a black border of unused pixels visible | |
# and your display can output without overscan | |
#disable_overscan=1 |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}
def json_error(status_code: int, exception: Exception) -> web.Response: | |
""" | |
Returns a Response from an exception. | |
Used for error middleware. | |
:param status_code: | |
:param exception: | |
:return: | |
""" | |
return web.Response( | |
status=status_code, |
docker run -i -t --name nodejs ubuntu:latest /bin/bash
So here, -i
stands for interactive mode and -t
will allocate a pseudo terminal for us.
Some more trivia about these flags.
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: scriptname | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Script short description | |
# Description: Starts/Stops the script |
Resources for learning web design & front-end development:
ONLINE
Design