Skip to content

Instantly share code, notes, and snippets.

View subomi's full-sized avatar
😝
What did you think you'd find here?

Subomi Oluwalana subomi

😝
What did you think you'd find here?
  • London, United Kingdom
View GitHub Profile
#!/usr/bin/env bash
#
# compliance-watch.sh — poll the Anthropic compliance activities API and print a table.
#
# Designed to run under `watch`, e.g.:
# watch -n 30 ./compliance-watch.sh -t claude_chat_created,claude_chat_deleted -e me@co.com \
# --col claude_chat_created:chat:.claude_chat_id --col claude_artifact_published:title:.title
#
# Env:
# ANTHROPIC_COMPLIANCE_API_KEY (required) bearer token
import { types } from "@acme/types-runtime"
import { openai } from "@acme/agent-sdk"
// step 1.
// retrieve a temporary typed sdk for the intent.
const sdk = await types.search({
intent: "find unpaid enterprise invoices older than 30 days"
})
import http from "k6/http";
import { check } from "k6";
const BASE_URL = "http://localhost:5002";
const LARGE_TEXT = `
John Smith is a senior software engineer at Acme Corporation, located at 1234 Elm Street, Springfield, IL 62701.
His work email is john.smith@acmecorp.com and his personal email is johnsmith1985@gmail.com.
You can reach him on his mobile at +1-312-555-0192 or at his office line 312-555-0100 ext. 204.
John was born on March 14, 1985, and his Social Security Number is 123-45-6789.
@subomi
subomi / convoy-cla.md
Created March 20, 2023 20:02
Convoy CLA

Contributor License Agreement

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”), and conveys certain license rights to Frain Technologies and its affiliates (“Frain”) for Your contributions to Frain’s open source projects. You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Frain’s open source projects.

1. Definitions

1.1. “You” or “Your” means any person or entity who exercises copyright or patent rights granted under this Agreement and who is making this Agreement with Frain. This also includes any person or entity controlled by the person or entity making this Agreement.
1.2. “Contribution” shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Frain for inclusion in, or documentation of, any of the products owned or managed by Frain (the "Project").
1.3. “Project” me

@subomi
subomi / twitter.go
Created July 7, 2022 12:40
Set up Twitter webhooks in Golang.
// Generate webhook URL.
package main
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"time"
@subomi
subomi / migrate.go
Created January 31, 2022 10:19
Migrate to Convoy.
package main
import (
"context"
"database/sql"
"fmt"
"log"
"os"
convoy "github.com/frain-dev/convoy-go"
@subomi
subomi / convoy-dependencies.json
Last active February 28, 2022 21:39
Convoy Configuration Files
{
"environment": "development",
"multiple_tenants": true,
"database": {
"type": "mongodb",
"dsn": "<insert-mongodb-dsn>"
},
"queue": {
"type": "redis",
"redis": {
@subomi
subomi / paystack_webhook_validation.rb
Created January 24, 2021 18:53
Handle Paystack webhook validation in Ruby.
# Controller to handle Event.
class PaystackController < ApplicationController
skip_before_action :authorize_request, only: :webhook
def webhook
paystack_instance = PaystackObject.instance
valid_event = paystack_instance.verify_webhook_event?(request)
raise StandardError, 'Phony event - Not Paystack' unless valid_event
render status: 200, plain: "Ok\n"
@subomi
subomi / states-local-govt.json
Created May 23, 2020 18:32
Nigeria States & Local governements
{
"Abia State": [
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala Ngwa North",
"Isiala Ngwa South",
"Isuikwuato",
"Obi Ngwa",
# config/routes.rb
flipper_auth_app = Flipper::UI.app(Flipper.instance) do |builder|
builder.use Rack::Auth::Basic do |username, password|
if username == ENV['FLIPPER_USERNAME'] && password == ENV['FLIPPER_PASSWORD']
true
else
false
end
end
end