Skip to content

Instantly share code, notes, and snippets.

@KTibow
KTibow / Monaco.svelte
Created November 6, 2022 20:14
Monaco editor in svelte
<script>
import { onMount } from "svelte";
import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
import tsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
let subscriptions = [];
export let content;
// PS. Tailwind classes used for wrapper.
import { FC, useEffect, useState } from 'react'
import { FieldContainer } from '@keystone-ui/fields'
import { Field } from '@keystone-6/fields-document/views'
enum EditorState {
Loading,
Ready,
}
@nelaaro
nelaaro / values.yaml
Last active July 15, 2024 05:28
superset and dex configuration superset helm
# I am only showing the relavant sections that worked for me
# Install additional packages and do any other bootstrap configuration in this script
# For production clusters it's recommended to build own image with this step done in CI
bootstrapScript: |
#!/bin/bash
rm -rf /var/lib/apt/lists/* && \
pip install \
psycopg2==2.8.5 \
redis==3.2.1 \
import com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider
import com.cloudbees.plugins.credentials.common.StandardCredentials
import com.cloudbees.hudson.plugins.folder.Folder
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.common.StandardCredentials.class, Jenkins.instance, null, null)
creds.eachWithIndex {
it,
i ->println "\n========== [Global] Credential ${i+1} Start =========="
it.properties.each {
println it

To access the api in this example, first we have to procure the Auth Token (using one of the OAuth2 Flows) containing a scope "canGreet".

Assumption is that the Authorization Server supports OpenId Connect 1.0 specifications.

---
apiVersion: 1.0.0
metadata:
name: web-java-spring-boot
attributes:
persistVolumes: 'false'
projects:
-
name: web-java-spring-boot
source:
@davidfauth
davidfauth / docker-compose-4_0.yml
Created September 24, 2019 13:56
Docker 4.0.0 Compose.yml
version: '3'
networks:
lan:
services:
core1:
image: neo4j:4.0.0-alpha10-enterprise
networks:
@josephan
josephan / setup_tailwind_in_phoenix.md
Last active August 8, 2023 05:50
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS
@cablespaghetti
cablespaghetti / gist:54de0ae93449e4698f0206a0e85514be
Last active November 2, 2022 14:20
Example terraform for ASG with spot instances
#
# Configuration for Autoscaling group.
#
resource "aws_launch_template" "eks-cluster-worker-nodes" {
iam_instance_profile = { name = "${aws_iam_instance_profile.eks-cluster-worker-nodes.name}" }
image_id = "${data.aws_ami.eks-worker.id}"
name = "${var.cluster-name}-eks-cluster-worker-nodes"
vpc_security_group_ids = ["${aws_security_group.eks-cluster-worker-nodes.id}"]
key_name = "${var.ssh-key-name}"
instance_type = "${local.host-types[0]}"
@krzysztof-slowinski
krzysztof-slowinski / sftp_sync.py
Last active January 25, 2023 05:43
Pysftp - get only the changed files from the remote directory
import os
import configparser as cp
import shutil
import pysftp
import paramiko
from paramiko.py3compat import decodebytes
# credentials file name
CREDENTIALS_FILE = 'sftp_sync_credentials.properties'