Skip to content

Instantly share code, notes, and snippets.

View MyWay's full-sized avatar

MyWay MyWay

  • Self-employed
  • Rome
View GitHub Profile
@MyWay
MyWay / gist:164746b52dfbec326a47a0589c4b1dec
Created August 17, 2026 20:18
vast-qwen.sh - spin up / tear down a 2x RTX 3090 vast.ai box serving
#!/usr/bin/env bash
# vast-qwen.sh — spin up / tear down a 2x RTX 3090 vast.ai box serving
# Qwen3.8-27B via vLLM: a plain OpenAI-compatible
# API on localhost:8080, usable from opencode, aider, LiteLLM, curl, etc.
#
# Requires: curl, jq, ssh (all already on this machine). No vastai CLI, no pip.
#
# Auth: export VAST_API_KEY=xxxx (from https://cloud.vast.ai/manage-keys/)
# or put the key alone in ~/.vast_api_key
#
@MyWay
MyWay / matrix.ts
Created May 3, 2023 21:06
Activepiece Send Matrix Message using Room Alias instead of Room Internal ID
// matrix/src/lib/common/common.ts
import { httpClient, HttpMethod, AuthenticationType, HttpResponse } from "@activepieces/pieces-common";
export async function getRoomId(baseUrl: string, roomAlias: string, accessToken: string): Promise<HttpResponse> {
const response = httpClient.sendRequest({
method: HttpMethod.GET,
url: `${baseUrl}/_matrix/client/r0/directory/room/${encodeURIComponent(roomAlias)}`,
authentication: {
type: AuthenticationType.BEARER_TOKEN,