Skip to content

Instantly share code, notes, and snippets.

View danieladarve's full-sized avatar

Daniel G Adarve danieladarve

  • Melbourne, Australia
  • 09:32 (UTC +11:00)
View GitHub Profile
@danieladarve
danieladarve / gist:55038314f896172a4d9898d5778469d7
Created May 8, 2021 03:54
Custom Fragment for CraftCMS Formie
query NODE_Form($id: [QueryArgument], $siteId: [QueryArgument]) {
formieForm(id: $id, siteId: $siteId) {
remoteTypeName: __typename
..._CraftFormID_
...Form
}
}
query LIST_Form($limit: Int, $offset: Int) {
formieForms(limit: $limit, offset: $offset, site: "default") {
@danieladarve
danieladarve / ssl-certificate.bash
Last active March 25, 2021 04:42
SSL Certificate Template
openssl req -new -sha256 -nodes -out /opt/homebrew/etc/nginx/ssl/<your_website>.csr -newkey rsa:2048 -keyout /opt/homebrew/etc/nginx/ssl/<your_website>.key -config <(
cat <<-EOF
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = AU
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = Victoria
@danieladarve
danieladarve / nginx-server-template.config
Last active March 25, 2021 22:04
nginx-server-template
server {
listen 127.0.0.1:80;
listen [::]:443 ssl http2;
server_name <your_website>.test www.<your_website>.test *.<your_website>.test;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;