source | rendered |
---|---|
Literal block style |
enum _ModelMutationType { | |
CREATED | |
UPDATED | |
DELETED | |
} | |
type _QueryMeta { | |
count: Int! | |
} |
directive @all( | |
""" | |
Specify the class name of the model to use. | |
This is only needed when the default model resolution does not work. | |
""" | |
model: String | |
""" | |
Apply scopes to the underlying query. | |
""" |
""" | |
Support for functionality to keep track of the sun. | |
For more details about this component, please refer to the documentation at | |
https://home-assistant.io/components/sun/ | |
""" | |
import math | |
import asyncio | |
import logging | |
from datetime import timedelta |
Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.
You can define the next environment variables:
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
require "attr_extras" # gem | |
class Month | |
vattr_initialize :year, :month_number | |
def self.from(object) | |
case object | |
when Month then object | |
else new(object.year, object.month) | |
end |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |