Thanks to David Winterbottom (@codeinthehole). See https://twitter.com/codeinthehole/status/1346774847221870593
- Open Chrome > Settings
- Search "manage search engines" and click into it
""" | |
This snippet will return all the letting agents, bucket into discrete bands based on distance from | |
an origin point (for example, the user's current location), then sorted alphabetically within each | |
bend. The goal being to prioritise agents in close proximity, but not execessively so -- all agents | |
within the same band should be given equal distance-related priority. | |
If there's a search term, we then boost the distance score based on the name's similiarity to the | |
search query. | |
""" | |
qs = LettingAgentLocation.objects.select_related("agent").filter(postcode__isnull=False) |
export OP_ACCOUNT=yunojuno.1password.com | |
# Create .env.local if it does not exist | |
if [ ! -f .env.local ] | |
then | |
echo "Creating .env.local" | |
cat <<EOF > .env.local | |
# Place secret env variables from 1Password and custom overrides here | |
# | |
# Any variables here will override ones set in .env.native.dist |
#!/usr/bin/env python | |
import argparse | |
import os | |
import subprocess | |
import sys | |
import time | |
# Required so we don't generate tons of logs during restore | |
disable_logging_sql = "ALTER USER postgres RESET pgaudit.log;" |
import os | |
import pickle | |
import warnings | |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from tensorflow.keras.callbacks import EarlyStopping | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.layers import Dropout |
-- Collision-resistant ids optimized for horizontal scaling and performance, for PL/PgSQL. | |
-- Based on https://github.com/ericelliott/cuid | |
-- Version 1.0.0 | |
-- Usage: SELECT cuid(); | |
-- BEGIN CONFIG --- | |
-- Put a unique host ID (int) here per server instance. | |
-- Once set, this value should not be changed. |
name: Build Docker image & run dependent jobs that pull tagged image | |
# Desires: | |
# | |
# 1) First job builds, pushes and tags docker image with ref/pr-number/sha - something specific to that branch. | |
# 2) n-jobs after this depend on success of first job, and will pull an image based on tag used in first job. | |
# 3) The n-jobs mount host GA workspace, or checkout code within the container itself. Not bothered which. | |
# 4) Rely on GitHub Action's yaml docker constructs only, rather than calling docker @ the cli | |
# This is not a _true_ requirement! I know how to get around it, but it is what I originally | |
# set out hoping to do - because it works very nicely when you're dealing with static tags |
Thanks to David Winterbottom (@codeinthehole). See https://twitter.com/codeinthehole/status/1346774847221870593
Just a quick fix dump for anyone not using ts-node-dev
who is getting the Property 'model' does not exist on type ObjectDefinitionBlock
or Property 'crud' does not exist on type ObjectDefinitionBlock
: ensure your type generations are getting output where you think they are.
ts-node-dev
does not transpile to a dist
folder whereas other typescript watchers (like tsc-watch
do). This is critical because if you output the generated types into your dist
folder, VSCode and TypeScript won't find them, and you'll get the above error.
Also be aware that nexus
& nexus-plugin-prisma
have their own type generations and their own config definition for where to output each.
This is a commented example of makeSchema
, with versions, so you can work out what's what:
nexus
: v1.0.0
nexus-plugin-prisma
: v0.27.0
import * as redis from "redis"; | |
import * as Websocket from "ws"; | |
import { v4 } from "uuid"; | |
import * as http from "http"; | |
function noop() {} | |
enum WebsocketSendType { | |
BROADCAST_EMIT = "BROADCAST_EMIT", | |
} |
const plugin = require('tailwindcss/plugin') | |
/* | |
Creates colored underline utility classes. | |
Explanation: https://css-tricks.com/almanac/properties/t/text-decoration-color/ | |
Browser Support: https://caniuse.com/#search=text-decoration-color | |
e.g | |