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| ## db/connect: create to the local database | |
| .PHONY: db/connect | |
| db/connect: | |
| sqlite3 db.sqlite | |
| ## db/migrations/new name=$1: create a new migration | |
| .PHONY: db/migrations/new | |
| db/migrations/new: | |
| go run -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest create -seq -ext=.sql -dir=./resources/migrations ${name} |
| // This file assures that a Jest test file and Cypress test file exists for each component. | |
| import path from "path"; | |
| import fs from "fs"; | |
| function getFiles(filepath: string) { | |
| return fs.readdirSync(filepath).filter(function (file) { | |
| return fs.statSync(path.join(filepath, file)).isFile(); | |
| }); | |
| } |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).| {{- with $.Params.images -}} | |
| <meta name="twitter:card" content="summary_large_image"/> | |
| <meta name="twitter:image" content="{{ index . 0 | absURL }}"/> | |
| {{ else -}} | |
| {{- $images := $.Resources.ByType "image" -}} | |
| {{- $featured := $images.GetMatch "*feature*" -}} | |
| {{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}} | |
| {{- with $featured -}} | |
| <meta name="twitter:card" content="summary_large_image"/> | |
| <meta name="twitter:image" content="{{ $featured.Permalink }}"/> |
| <meta property="og:title" content="{{ .Title }}" /> | |
| <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> | |
| <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> | |
| <meta property="og:url" content="{{ .Permalink }}" /> | |
| {{ with .Params.images }}{{ range first 6 . }} | |
| <meta property="og:image" content="{{ . | absURL }}" /> | |
| {{ end }}{{ end }} | |
| {{ if .IsPage }} | |
| {{ if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/> | |
| {{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }} |
Rollup 0.48 introduces a few changes to the options object, because the current options are confusingly different between the CLI and the options exported by your config file.
entry is now inputsourceMap and sourceMapFile are now sourcemap and sourcemapFile (note casing)moduleName is now nameuseStrict is now strictThe dest and format options are now grouped together as a single output: { file, format, ... } object. output can also be an array of { file, format, ... } objects, in which case it behaves similarly to the current targets. Other output options — exports, paths and so on — can be added to the output object (though they will fall back to their top-level namesakes, if unspecified).
| version: 2 | |
| jobs: | |
| build: | |
| working_directory: ~/mowers | |
| docker: | |
| - image: circleci/ruby:2.4.1-node | |
| environment: | |
| PGHOST: 127.0.0.1 | |
| PGUSER: mower | |
| RAILS_ENV: test |
| "prettier": "prettier --single-quote --print-width 80 --trailing-comma all --write '{src}/**/*.js'" |
Source: https://www.leowkahman.com/2016/03/19/disable-ipv6-raspberry-raspbian/
Firstly, check for presence of IPv6 using ifconfig. You should be seeing a few lines containing inet6 addr: ....
To disable, edit a file: sudo nano /etc/sysctl.conf
Add the following line:
net.ipv6.conf.all.disable_ipv6 = 1