(def ■ '■) | |
(def ▲ '▲) | |
(def ● '●) | |
(first [● ■ ▲]) ; ● | |
(second [● ■ ▲]) ; ■ | |
(nth [● ■ ▲] 2) ; ▲ | |
(rest [● ■ ▲]) ; (■ ▲) | |
(last [● ■ ▲]) ; ▲ | |
(butlast [● ■ ▲]) ; (● ■) |
- Weekly Agenda (created on a different day, and embedded with
/Block Reference
) - [[Morning Questions]]
- {{[[slider]]}} How many hours of sleep did I get?
- What's one thing top of mind today?
- What's the one thing I need to get done today to make progress?
- Review #[[Index: Questions]] #values
- Agenda
- {{[[TODO]]}} Morning walk #goal-health #habit
- {{[[TODO]]}} Check calendar for scheduled events
- {{[[TODO]]}} Morning focus hour
This logback configuration is an example of diverting debug level logs for a specific package to a separate file, while maintaining info level in the main log. This allows viewing all package logs in context, and then when an info or warn level log appears, you can switch to the debug log and see that line in context with debug statements.
This is particularly useful for debugging a new or troublesome package in production without cluttering up your main log stream.
The main
appender is the primary appender to which all application logs are
(ns mock-avro-example | |
(:require | |
[clojure.data.json :as json] | |
[jackdaw.streams :as k] | |
[jackdaw.serdes.avro :as avro] | |
[jackddaw.serdes.avro.schema-registry :as reg] | |
[jackdaw.test :as jdt])) | |
(def foo-schema | |
{:type :record |
#!/bin/sh | |
#_( | |
#_DEPS is same format as deps.edn. Multiline is okay. | |
DEPS=' | |
{:deps {clj-time {:mvn/version "0.14.2"}}} | |
' | |
#_You can put other options here | |
OPTS=' |
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'Cloudformation stack to manage permission to deploy a serverless service' | |
Parameters: | |
ServiceName: | |
Description: Name of the Service you want to deploy | |
Type: String | |
Resources: |
################################################################################ | |
# Vars | |
# $< Dependency (right) | |
# $@ Target (left) | |
CLJ_NREPL_PORT:=22340 | |
FIGWHEEL_PORT:=22345 | |
LEIN_NREPL_PORT:=22350 | |
CLJ_NREPL_PORT_TRY:=22355 |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
#!/bin/bash | |
# output format is like this: | |
# upload: index.html to s3://$BUCKET/index.html | |
# | |
# so we grab the second item which is the file path and pass that via xargs to the | |
# cloudfront invalidation command | |
aws s3 sync --sse AES256 s3://$BUCKET/ site/ | awk '{print $2;}' | \ | |
xargs aws cloudfront create-invalidation --distribution-id $CF_DISTRO_ID --paths |