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
FROM cgr.dev/chainguard/bash:latest as permify-runner | |
WORKDIR /app | |
COPY --from=ghcr.io/grpc-ecosystem/grpc-health-probe:v0.4.25 /ko-app/grpc-health-probe /usr/local/bin/grpc_health_probe | |
COPY --from=ghcr.io/permify/permify:v0.9.0 /usr/local/bin/permify /usr/local/bin/permify | |
COPY --from=cgr.dev/chainguard/curl /usr/bin/curl /usr/bin/curl | |
COPY apps/permify/configs configs | |
COPY apps/permify/scripts scripts |
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 getPermifyClient from "./clients/permify"; | |
getPermifyClient() | |
.tenancy.list({ pageSize: 10 }) | |
.then((response) => { | |
console.log(response); | |
}); |
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
{ | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Current TS file", | |
"runtimeArgs": ["-r", "ts-node/register"], | |
"args": ["${file}"] | |
}, | |
{ |
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
#!/usr/bin/env node | |
const fs = require("fs"); | |
const buildAt = new Date().toISOString(); | |
const buildEnv = process.env.ENVIRONMENT; | |
main(); | |
function main() { |
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
// npm i -S pino | |
// npm i -D pino-pretty | |
import pino from "pino"; | |
const { LOG_LEVEL = "debug", APP_NAME = "Web" } = process.env; | |
const isProduction = process.env.NODE_ENV === "production"; | |
const logger = pino({ | |
name: APP_NAME, |
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 Koa, { Context } from "koa"; | |
import bodyParser from "@koa/bodyparser"; | |
import registerRoutes from "./routers"; | |
import Jwt from "koa-jwt"; | |
const { THIRD_PARTY_APP_JWT_SECRET = "" } = process.env; | |
const koaApp = new Koa(); | |
koaApp.use(bodyParser()); | |
koaApp.use(async (ctx: Context, next) => { |
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
ps aux | grep -i 3000 | grep -v grep | awk {'print $2'} | xargs kill -9 |
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
INSTANCE_NAME=nucleus-jumphost-570 | |
PORT=8080 | |
REGION=us-west4 | |
ZONE=us-west4-a | |
FIREWALL_RULE=allow-tcp-rule-698 | |
# setup | |
gcloud config set compute/zone $ZONE | |
gcloud config set compute/region $REGION |
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
package com.pragmatists.blog.events.application; | |
import java.util.Random; | |
import java.util.function.Function; | |
import java.util.function.Supplier; | |
public class HOFSampleToro { | |
public static void main(String[] args) { |
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
<plugin> | |
<groupId>com.diffplug.spotless</groupId> | |
<artifactId>spotless-maven-plugin</artifactId> | |
<version>2.24.0</version> | |
<configuration> | |
<formats> | |
<format> | |
<includes> | |
<include>*.md</include> | |
<include>.gitignore</include> |
NewerOlder