- Press Fn + Alt + k for 5 seconds.
- Set up the keys on the right of your space bar as: AltGr > Windows > Ctrl > Fn
- Press Escape to quit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For updates, leave a comment below! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 8base / Auth0 - Passwordless Login/Signup | |
Follow the conversation over there: [https://community.8base.com/t/using-auth0-passwordless-email-connection/529/6](https://community.8base.com/t/using-auth0-passwordless-email-connection/529/6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventBus { | |
registry = new Map() | |
constructor() {} | |
on(type, handler) { | |
const handlers = this.registry.get(type) | |
const added = handlers && handlers.push(handler) | |
if (!added) { | |
this.registry.set(type, [handler]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import FormulateForm from './FormulateForm.vue' | |
export function plugin(instance) { | |
instance.extend({ | |
components: { | |
FormulateForm, | |
}, | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { query as q, Expr } from 'faunadb'; | |
export function TypeOf(value: Expr) { | |
return q.Let( | |
{ | |
value, | |
type: q.Let( | |
[ | |
{ t: null }, | |
{ t: q.If(q.IsString(q.Var('t')), q.Var('t'), q.If(q.IsArray(q.Var('value')), 'array', q.Var('t'))) }, |
To add the snippets:
- Hit > shift + command + p and type snippets (or go look for 2.)
- Select Preferences: Open User Snippets
- Choose the language type for which you want to add the custom snippet (choosed all, for js/ts/fql files)
- Copy/Paste the snippets.json content in there
Currently covered:
- q.Lambda
- q.Let
- q.Var
CreateIndex({
name: 'ngram_on_users',
source: {
collection: Collection('users'),
fields: {
search: Query(Lambda('instance',
Union(
Union(Map([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], Lambda('min', NGram(LowerCase(Select(['data', 'first_name'], Var('instance'))), Var('min'), Var('min'))))),
Union(Map([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], Lambda('min', NGram(LowerCase(Select(['data', 'last_name'], Var('instance'))), Var('min'), Var('min')))))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HasRole - User-Defined Function | |
CreateFunction({ | |
name: 'HasRole', | |
body: Query(Lambda(['role', 'ref'], Select(Var('role'), Call('RolesMemberships', [Var('ref')]), false))) | |
}) |
NewerOlder