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
| package txmanager | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "github.com/jmoiron/sqlx" | |
| dbtx "ccbackend/db/tx" |
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 | |
| # Use the first argument as the message, or default to "I finished my current task" | |
| message="${1:-I finished my current task}" | |
| osascript -e "display notification \"$message\" with title \"claude code\" sound name \"Funk\"" |
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 | |
| osascript -e 'tell application "System Events" to if (name of first application process whose frontmost is true) is not "Alacritty" then display notification "I finished my current task" with title "claude code" sound name "Funk"' |
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 type { Result } from "true-myth"; | |
| export function newSlackAlertInterceptor(args: { | |
| slackWebhookUrl: string; | |
| environment: string; | |
| appName: string; | |
| logsUrl: string; | |
| }) { | |
| const { slackWebhookUrl, environment, appName, logsUrl } = args; | |
| const baseParams = { |
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 { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | |
| import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; | |
| import { z } from "zod"; | |
| const server = new McpServer({ | |
| name: "Weather server", | |
| version: "1.0.0", | |
| }); | |
| server.tool( |
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
| version: '2.2' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2 | |
| volumes: | |
| - ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro | |
| healthcheck: | |
| test: ["CMD", "curl", "-s", "-f", "http://localhost:9200/_cat/health"] | |
| interval: 3s |
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
| git clone https://github.com/pmihaylovcom/go-elk-tutorial |
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
| package main | |
| // imports | |
| func main() { | |
| fx.New( | |
| bundlefx.Module, | |
| fx.Invoke(httphandler.New), | |
| ).Run() | |
| } |
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
| package bundlefx | |
| // imports | |
| func registerHooks( | |
| lifecycle fx.Lifecycle, | |
| logger *zap.SugaredLogger, cfg *configfx.Config, mux *http.ServeMux, | |
| ) { | |
| lifecycle.Append( | |
| fx.Hook{ |
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
| package main | |
| // imports | |
| func main() { | |
| fx.New( | |
| configfx.Module, | |
| loggerfx.Module, | |
| httpfx.Module, | |
| fx.Invoke(httphandler.New), |
NewerOlder