Skip to content

Instantly share code, notes, and snippets.

😕
Why does GitHub need statuses?

Alice WheresAlice

😕
Why does GitHub need statuses?
Block or report user

Report or block WheresAlice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@WheresAlice
WheresAlice / openapi.yaml
Created Jun 10, 2019
OpenAPI spec for Confluent Schema Registry
View openapi.yaml
openapi: 3.0.1
info:
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.
externalDocs:
url: >-
https://docs.confluent.io/current/schema-registry/develop/api.html#schemaregistry-api
description: Confluent's API reference
paths:
@WheresAlice
WheresAlice / rest_proxy.yaml
Last active Jun 10, 2019
Swagger OpenAPI spec for Confluent REST Proxy
View rest_proxy.yaml
openapi: 3.0.1
info:
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>
<ul>
<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
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)
point.abs.to_i
end
def minutes(point)
(point.abs * 60).to_i % 60
end
@WheresAlice
WheresAlice / Makefile
Last active May 6, 2019
unistd read() overflow
View Makefile
test:
gcc test.c -o test
@WheresAlice
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
library(prophet)
# 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
WheresAlice / Leeds Food.md
Created Feb 9, 2019
I took your recommendations and collated a list of Leeds food recommendations
View Leeds Food.md
@WheresAlice
WheresAlice / backup.sh
Last active Jan 8, 2019
Backup your github repos to Bitbucket
View backup.sh
# Usage: change username:password to either an app-password or your actual password
# Change WheresAlice to your actual username on Bitbucket.org
# 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 https://github.com/settings/tokens and then uncomment this line in order to clone the first 100 of your github repositories
# curl 'https://api.github.com/user/repos?access_token=my_token&affiliation=owner&per_page=100' | gron | grep ssh_url | cut -d'"' -f2 | xargs -I {} git clone {}
@WheresAlice
WheresAlice / User Growth.png
Last active Jan 3, 2019
Predict future growth of your Slack org using R and Facebook's Prophet library
@WheresAlice
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 http://pkg.jenkins.io/redhat-stable/repodata`
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)
View README.md
You can’t perform that action at this time.