Skip to content

Instantly share code, notes, and snippets.

View tommymcguiver's full-sized avatar

Kenneth Miles tommymcguiver

  • Brisbane
View GitHub Profile
@tommymcguiver
tommymcguiver / rotateLeft.go
Created October 12, 2018 03:25
Rotate Left
package main
import (
"fmt"
)
func rotateLeft(a []int, times int) []int {
for x := 0; x < times; x++ {
a = append(a[1:], a[:1]...)
}
@tommymcguiver
tommymcguiver / kafka-cheat-sheet.md
Created January 22, 2018 23:49 — forked from sahilsk/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
# Example Use:
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
# Example Use: