du -hs ~/workspace
cd ~/workspace;
I want to quit the VPN
launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*
I want to use the VPN again
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*
HTTP push, often referred to as server push, is a technique where the server sends data to the client without the client having to request it. This is typically used in real-time applications like live notifications, chat applications, and live updates. There are several ways to implement HTTP push, such as using WebSockets, Server-Sent Events (SSE), and HTTP/2 Push.
Here's an overview of these methods:
WebSockets provide a full-duplex communication channel over a single, long-lived connection. This is suitable for applications that require continuous data exchange.
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 |
import getPermifyClient from "./clients/permify"; | |
getPermifyClient() | |
.tenancy.list({ pageSize: 10 }) | |
.then((response) => { | |
console.log(response); | |
}); |
{ | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Current TS file", | |
"runtimeArgs": ["-r", "ts-node/register"], | |
"args": ["${file}"] | |
}, | |
{ |
#!/usr/bin/env node | |
const fs = require("fs"); | |
const buildAt = new Date().toISOString(); | |
const buildEnv = process.env.ENVIRONMENT; | |
main(); | |
function main() { |
// 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, |
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) => { |
ps aux | grep -i 3000 | grep -v grep | awk {'print $2'} | xargs kill -9 |