Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.
| import { useLoaderData } from "@remix-run/react"; | |
| import { useEffect } from "react"; | |
| export const useStrictLoaderData = () => { | |
| const data = useLoaderData(); | |
| const accessed = [] as String[]; | |
| const getAllKeys = (obj: any, path = "") => { | |
| const keys = [] as String[]; |
| defmodule MyApp.Telemetry do | |
| require Logger | |
| def handle_event([:my_app, :repo, :query], measurements, metadata, _config) do | |
| milliseconds = System.convert_time_unit(measurements.total_time, :native, :millisecond) | |
| # did the query take longer than 100ms? | |
| if milliseconds > 100 do | |
| # log it as a warning | |
| Logger.warn("SLOW QUERY: ms: #{milliseconds}, query: #{metadata.query}") |
| # Preloading usually required an extra query. | |
| # To do it in one query, a `join` is needed, and the call to `preload` needs to know the name of join | |
| # This macro does both the `join` and `preload` together | |
| defmodule Preloader do | |
| import Ecto, only: [assoc: 2] | |
| alias Ecto.Query.Builder.{Join, Preload} | |
| defmacro preload_join(query, association) do | |
| expr = quote do: assoc(l, unquote(association)) | |
| binding = quote do: [l] |
Create the app and download the necessary dependencies.
| const features = [ | |
| 'Map', | |
| 'Set', | |
| 'requestAnimationFrame' | |
| ] | |
| function browserSupportsAllFeatures() { | |
| return features.every(f => window[f]) | |
| } |
I had a few issues getting the Crystal compiler to run on MacOS Sierra, these are the seteps I took to get it up and running.
Firstly install the Crystal Language through Homebrew;
brew install crystal-lang
See Configuring NGINX to accept the PROXY Protocol - NGINX
upstream wsserver {
server 127.0.0.1:9000;
}| 0815.ru | |
| 0wnd.net | |
| 0wnd.org | |
| 10minutemail.co.za | |
| 10minutemail.com | |
| 123-m.com | |
| 1fsdfdsfsdf.tk | |
| 1pad.de | |
| 20minutemail.com | |
| 21cn.com |