Skip to content

Instantly share code, notes, and snippets.

Why does GitHub need statuses?

Alice wheresalice

Why does GitHub need statuses?
View GitHub Profile
wheresalice / openapi.yaml
Created Jun 10, 2019
OpenAPI spec for Confluent Schema Registry
View openapi.yaml
openapi: 3.0.1
title: Schema Registry
version: 5.2.1
description: Schema Registry provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving Avro schemas. It stores a versioned history of all schemas, provides multiple compatibility settings and allows evolution of schemas according to the configured compatibility settings and expanded Avro support. It provides serializers that plug into Apache Kafka® clients that handle schema storage and retrieval for Kafka messages that are sent in the Avro format.
url: >-
description: Confluent's API reference
wheresalice / rest_proxy.yaml
Last active Apr 14, 2022
Swagger OpenAPI spec for Confluent REST Proxy
View rest_proxy.yaml
openapi: 3.0.1
title: REST Proxy API
description: >-
The Confluent REST Proxy provides a RESTful interface to a Kafka cluster, making it easy to produce and consume messages, view the state of the cluster, and perform administrative actions without using the native Kafka protocol or clients.
<p>Some example use cases are</p>
<li>Reporting data to Kafka from any frontend app built in any language not supported by official Confluent clients</li>
<li>Ingesting messages into a stream processing framework that doesn’t yet support Kafka</li>
<li>Scripting administrative actions</li>
wheresalice / loc_generator.rb
Created May 9, 2019
Hacky ruby script to generate RFC 1876 DNS LOC records from RFC 7946 Geojson file
View loc_generator.rb
require 'json'
def degrees(point)
def minutes(point)
(point.abs * 60).to_i % 60
wheresalice / Makefile
Last active May 6, 2019
unistd read() overflow
View Makefile
gcc test.c -o test
wheresalice / jira_prediction.r
Created Apr 24, 2019
Take a MySQL export of Jira ticket count per day, use Facebook's Prophet library to predict the next year, and then graph that.
View jira_prediction.r
# mysql -e "select distinct(CAST(CREATED AS DATE)) C, COUNT(*) from jira.jiraissue WHERE project=1 AND reporter='alice' group by C;" -N -B > jira.txt
jira <- read.delim('jira.txt', header=FALSE)
dates <- as.POSIXct(strptime(jira$V1, "%Y-%m-%d"))
jira_with_dates <-data.frame(dates, jira['V2'])
names(jira_with_dates) = c("ds", "y")
wheresalice / Leeds
Created Feb 9, 2019
I took your recommendations and collated a list of Leeds food recommendations
View Leeds
wheresalice /
Last active Jan 8, 2019
Backup your github repos to Bitbucket
# Usage: change username:password to either an app-password or your actual password
# Change WheresAlice to your actual username on
# Run this script from the directory with all your GitHub checkouts in
# @TODO - Due to Mac limitations of 'find' we are listing all files, not just directories
# @TODO - Get a list of GitHub repos and clone them all
# @TODO - Do this for GitLab too
# Replace my_token with a token from and then uncomment this line in order to clone the first 100 of your github repositories
# curl '' | gron | grep ssh_url | cut -d'"' -f2 | xargs -I {} git clone {}
wheresalice / User Growth.png
Last active Jan 3, 2019
Predict future growth of your Slack org using R and Facebook's Prophet library
wheresalice / yum_repo_test.rb
Last active Dec 28, 2018
Test the health of a yum repository, ensuring that the repomd.xml file and linked data files can all be downloaded. Usage: `ruby yum_repo_test.rb`
View yum_repo_test.rb
require 'open-uri'
require 'nokogiri'
BASE_PATH = ARGV[0].freeze
@repomd = Nokogiri::XML(open(File.join(BASE_PATH, 'repomd.xml')).read)
def test_path(type)
href = @repomd.xpath("/xmlns:repomd/xmlns:data[@type=\"filelists\"]/xmlns:location").first['href']
full_path = File.join(File.dirname(BASE_PATH), href)