ccloud kafka topic create --partitions 1 test-topic
ccloud kafka topic produce test-topic --value-format avro --schema /path/to/schema.json
{"myField":"test","myField2":1}
{"myField":"foo","myField2":2}Finish Getting Started with Schema Registry
| require 'sinatra' | |
| require 'net/http' | |
| require 'uri' | |
| require 'json' | |
| get '/frank-says' do | |
| 'Put this in your pipe & smoke it!' | |
| end | |
| post '/submit' do |
| # frozen_string_literal: true | |
| require 'csv' | |
| require 'restforce' | |
| CONFIG = { | |
| username: '', | |
| password: ENV['SFDC_PASSWORD'], | |
| client_id: '', | |
| client_secret: ENV['SFDC_CLIENT_SECRET'], |
| require 'csv' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'pry' | |
| urls = File.read('urls.txt').split("\n") | |
| CSV.open('scraped_data.csv', 'wb') do |csv| | |
| urls.each do |url| | |
| html = URI.open(url).read |
| #!/usr/bin/env ruby | |
| require 'delivery_boy' | |
| # topic = 'raw-transactions-truelayer' | |
| topic = ARGV[0] | |
| command = "stream-kafka #{topic}" | |
| CONFIG = { | |
| brokers: ['---.europe-west1.gcp.confluent.cloud:9092'], |
| # frozen_string_literal: true | |
| module Karafka | |
| class App | |
| CONFIG = Rails.application.credentials.kafka | |
| setup do |config| | |
| config.client_id = 'cas_client' | |
| config.kafka = { |
| require 'socket' | |
| socket = TCPServer.new(4040) | |
| loop do | |
| client = socket.accept | |
| first_line = client.gets | |
| verb, path, _ = first_line.split | |
| if verb == 'GET' |
ccloud kafka topic create --partitions 1 test-topic
ccloud kafka topic produce test-topic --value-format avro --schema /path/to/schema.json
{"myField":"test","myField2":1}
{"myField":"foo","myField2":2}Finish Getting Started with Schema Registry
| 2021-07-29T11:29:38.0007456Z ##[group]Starting datadog-agent service container | |
| 2021-07-29T11:29:38.0009102Z ##[command]/usr/bin/docker pull datadog/agent:latest | |
| 2021-07-29T11:29:39.4210209Z latest: Pulling from datadog/agent | |
| 2021-07-29T11:29:39.7656448Z 1127acbecdf7: Pulling fs layer | |
| 2021-07-29T11:29:41.8115266Z 1127acbecdf7: Verifying Checksum | |
| 2021-07-29T11:29:41.8115918Z 1127acbecdf7: Download complete | |
| 2021-07-29T11:29:50.9679094Z 1127acbecdf7: Pull complete | |
| 2021-07-29T11:29:50.9742704Z Digest: sha256:da43df11da9f6052d1a8691c87c5b1df60e79352f94c4ed7a53465e1a51dac04 | |
| 2021-07-29T11:29:50.9761841Z Status: Downloaded newer image for datadog/agent:latest | |
| 2021-07-29T11:29:50.9798695Z docker.io/datadog/agent:latest |
| #!/usr/bin/env bash | |
| # Usage | |
| # cred-diff <env> (<branch|ref>|master) | |
| # eg | |
| # cred-diff production master | |
| VAR=$2 | |
| REF="${VAR:-main}" | |
| git checkout $REF --quiet | |
| printf . |
| #!/usr/bin/env bash | |
| # Usage: | |
| # diff-creds production | |
| git checkout master --quiet | |
| printf . | |
| rails credentials:show --environment $1 > /tmp/prod | |
| printf . | |
| git checkout - --quiet | |
| printf . |