CREATE OR REPLACE FUNCTION app_private.tg__user_stripe_customer_sync() RETURNS trigger AS
$$
DECLARE
stripe_customer app_private.stripe_customers;
BEGIN
SELECT *
INTO stripe_customer
This file contains hidden or 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 | |
set -e | |
# Assign the first argument to yaml_file variable | |
yaml_file=$1 | |
model="mistral" | |
ollama_endpoint=http://localhost:11434/api/chat | |
# Check if the YAML file path is provided | |
if [ -z "$1" ]; then |
This file contains hidden or 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
# https://computingforgeeks.com/restrict-kubernetes-service-account-users-to-a-namespace-with-rbac/?expand_article=1 | |
# If you want to expose a diffrent port rather than 6443 we can port forward using UFW | |
# ufw route allow to 0.0.0.0 port 6443 from 0.0.0.0 port 42544 | |
# sudo iptables -A PREROUTING -t nat -i enp1s0 -p tcp --dport 44394 -j REDIRECT --to-port 6443 | |
export NAMESPACE=nextjs-sqlite | |
export K8S_USER="github-actions" | |
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: Namespace |
This file contains hidden or 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 React from "react"; | |
import { UserAddressInput } from "~/graphql-types"; | |
import TextField from "~/components/TextField"; | |
interface AddressState extends UserAddressInput { | |
isPrimary: boolean; | |
} | |
export const useAddressState = () => | |
React.useReducer(fieldReducer, { |
This file contains hidden or 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
NAMESPACE=jtx-staging | |
DATABASE_NAME=jtx | |
DATABASE_ROOT_PASSWORD=$(openssl rand -hex 32) | |
DATABASE_OWNER=${DATABASE_NAME}_owner | |
DATABASE_OWNER_PASSWORD=$(openssl rand -hex 32) | |
DATABASE_AUTHENTICATOR=${DATABASE_NAME}_authenticator | |
DATABASE_AUTHENTICATOR_PASSWORD=$(openssl rand -hex 32) |
I hereby claim:
- I am ncrmro on github.
- I am ncrmro (https://keybase.io/ncrmro) on keybase.
- I have a public key ASCTq5JbMHeIz1ym_uEodPpipL1QD57IcH0cbVs6oKdT1Qo
To claim this, I am signing this object:
This file contains hidden or 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
// URL with country, language, path and query (could remove the country and language easly enough | |
((?<protocol>https?)?(:\/\/)?(?<host>[^\/]*\.[^\/]*))?(\/(?<country>\w{2})?\/(?<language>\w{2}))?(?<path>\/[^?]*)?(?<query>\?.*)? |
This file contains hidden or 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
ssh_authorized_keys: | |
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILz8pN4JIWGXt2zZlj4qIrxgXtF6Nc2O06MAazcSj3hm ncrmro-workstation-22-07-2020 | |
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA4cFS7p6Dkh1Aj60scG7qrTAJufD65b5YYGLabgpnEX ncrmro-laptop |
This file contains hidden or 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
artul() { | |
MAC_ADDRESS=94:c6:91:ae:53:fc | |
NETWORK=192.168.1 | |
echo Attempting to find IP address of host to unlock with MAC address $MAC_ADDRESS on $NETWORK.0 | |
IP_ADDRESS=`for ((i=1; i<=255; i++));do arp $NETWORK.$i; done | grep $MAC_ADDRESS | awk '{print $2}' | sed -e 's/(//' -e 's/)//'` | |
echo Found IP address: $IP_ADDRESS | |
ssh root@$IP_ADDRESS -p 22 -i ~/.ssh/id_rsa | |
} |
This file contains hidden or 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/sh | |
set -e | |
## Current folder name | |
PROJECT_NAME=${PWD##*/} | |
DEPLOY_HOST=pi | |
DEPLOY_USER=pi | |
CHECKSUM_FILE=target/checksum |
NewerOlder