Skip to content

Instantly share code, notes, and snippets.

Ryan Wilson-Perkin ryanwilsonperkin

Block or report user

Report or block ryanwilsonperkin

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
@ryanwilsonperkin
ryanwilsonperkin / .dockerignore
Created Oct 29, 2018
convox start does not respect .dockerignore for code sync
@ryanwilsonperkin
ryanwilsonperkin / commits.py
Created Feb 26, 2019
Count all the lines I've ever changed on GitHub
View commits.py
#!/usr/local/bin/python3
"""
Count all the lines I've ever changed on GitHub
Setup:
pip install requests tqdm GitPython
Usage:
./commits.py
"""
@ryanwilsonperkin
ryanwilsonperkin / flaky.py
Last active Feb 26, 2019
Fetch a list of flaky tests form a CircleCI project
View flaky.py
#!/usr/local/bin/python3
"""
@author Ryan Wilson-Perkin
Fetch a list of flaky tests from a CircleCI project.
Searches the last 30 builds that have failed on the master branch, downloads any
junit.xml artifacts it finds for them, and reports the tests that have failed.
Branch name, test results file, number of builds, and number of results are all
@ryanwilsonperkin
ryanwilsonperkin / Dockerfile
Created Mar 12, 2019
Comparing the use of apt-get vs apt-fast for installing packages in Debian
View Dockerfile
# A standard Debian container extended with apt-fast (https://github.com/ilikenwf/apt-fast/)
FROM debian
LABEL maintainer="rwilsonperkin@waveapps.com"
# Install gnupg to allow apt-key verification, time to allow profiling
RUN apt-get update
RUN apt-get install -y gnupg time
# Set up PPA for apt-fast
RUN echo deb http://ppa.launchpad.net/apt-fast/stable/ubuntu bionic main >> /etc/apt/sources.list.d/apt-fast.list \
@ryanwilsonperkin
ryanwilsonperkin / App.tsx
Created Nov 8, 2019
An example of using React Context to make data available to deeply nested components
View App.tsx
import React from "react";
import { ThemeProvider } from "./Theme";
import ToggleTheme from "./ToggleTheme";
import ThemedText from "./ThemedText";
const App: React.FC = () => (
<ThemeProvider>
<ToggleTheme />
<ThemedText>Hello World</ThemedText>
</ThemeProvider>
You can’t perform that action at this time.