Skip to content

Instantly share code, notes, and snippets.

Avatar

cocdeveloper@gmail.com freegor

View GitHub Profile
@ursuad
ursuad / kafka-cheat-sheet.md
Last active Sep 28, 2020
Quick command reference for Apache Kafka
View kafka-cheat-sheet.md

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@hotpaw2
hotpaw2 / RecordAudio.swift
Last active Sep 15, 2020
Swift Audio Recording class. Reads buffers of input samples from the microphone using the iOS RemoteIO Audio Unit API
View RecordAudio.swift
//
// RecordAudio.swift
//
// This is a Swift class (updated for Swift 5)
// that uses the iOS RemoteIO Audio Unit
// to record audio input samples,
// (should be instantiated as a singleton object.)
//
// Created by Ronald Nicholson on 10/21/16.
// Copyright © 2017,2019 HotPaw Productions. All rights reserved.
@hotpaw2
hotpaw2 / ToneOutputUnit.swift
Last active May 5, 2020
Swift 3 Audio class that can play a simple tone on an iOS device
View ToneOutputUnit.swift
//
// ToneOutputUnit.swift
//
// This is a Swift 3 class (which should be instantiated as a singleton object)
// that can play a single tone of arbitrary tone and frequency on iOS devices
// using run-time sinewave synthesis and the Audio Unit v3 API with RemoteIO.
//
// Created by Ronald Nicholson rhn@nicholson.com on 2/20/2016.
// revised 2016-Sep-08 for Swift 3
// http://www.nicholson.com/rhn/
You can’t perform that action at this time.