If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image /> and <FastImage /> (read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {| import { | |
| HttpApi, | |
| HttpApiBuilder, | |
| HttpApiEndpoint, | |
| HttpApiGroup, | |
| HttpApiMiddleware, | |
| HttpApiSwagger, | |
| HttpServerRequest | |
| } from "@effect/platform" | |
| import { NodeHttpServer, NodeRuntime } from "@effect/platform-node" |
| import * as Http from "@effect/platform/HttpClient" | |
| import { Schema } from "@effect/schema" | |
| import { Array, Config, Context, Data, Effect, Layer, flow } from "effect" | |
| import { Inngest as Inngest_ } from "inngest" | |
| class InngestRun extends Schema.Class<InngestRun>("InngestRun")({ | |
| run_id: Schema.String, | |
| status: Schema.Literal("Running", "Completed", "Failed", "Cancelled"), | |
| }) { | |
| static decodeArray = Http.response.schemaBodyJsonScoped( |
| import * as Http from "@effect/platform/HttpClient" | |
| import { Context, Effect, Layer, pipe } from "effect" | |
| const headers = { | |
| Accept: | |
| "application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", | |
| "Content-Type": "application/json", | |
| } | |
| export class GraphQLClient extends Context.Tag("graphql-codegen/GraphQLClient")< |
If anybody needs animated webP support with Expo (Custom Dev Client) for the native <Image /> and <FastImage /> (read comments):
// create a file like plugins/withAnimatedWebPSupport.js -> this is for the native <Image />
const {| --- | |
| name: Post-deploy | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'master' | |
| env: | |
| PLATFORMSH_CLI_TOKEN: ${{ secrets.CLI_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ACC_MIN: 0.80 |
| -- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
| create or replace function uuid_generate_v7() | |
| returns uuid | |
| as $$ | |
| begin | |
| -- use random v4 uuid as starting point (which has the same variant we need) | |
| -- then overlay timestamp | |
| -- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
| return encode( |
| # normal brew nvm shell config lines minus the 2nd one | |
| # lazy loading the bash completions does not save us meaningful shell startup time, so we won't do it | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion | |
| # add our default nvm node (`nvm alias default 10.16.0`) to path without loading nvm | |
| export PATH="$NVM_DIR/versions/node/v$(<$NVM_DIR/alias/default)/bin:$PATH" | |
| # alias `nvm` to this one liner lazy load of the normal nvm script | |
| alias nvm="unalias nvm; [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"; nvm $@" |
| -- A global variable for the Hyper Mode | |
| k = hs.hotkey.modal.new({}, "F17") | |
| -- Trigger existing hyper key shortcuts | |
| k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end) | |
| -- OR build your own | |
| launch = function(appname) |
| // Epochs | |
| const epochs = [ | |
| ['year', 31536000], | |
| ['month', 2592000], | |
| ['day', 86400], | |
| ['hour', 3600], | |
| ['minute', 60], | |
| ['second', 1] | |
| ]; |
UNLOGGED table. This reduces the amount of data written to persistent storage by up to 2x.WITH (autovacuum_enabled=false) on the table. This saves CPU time and IO bandwidth
on useless vacuuming of the table (since we never DELETE or UPDATE the table).COPY FROM STDIN. This is the fastest possible approach to insert rows into table.time timestamp with time zone is enough.synchronous_commit = off to postgresql.conf.