Skip to content

Instantly share code, notes, and snippets.

❯ g co master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
❯ ./run-tests --fast -q
Starting Vim: neovim-v0.3.5...
Starting Vint...
Starting Custom checks...
========================================
Running custom linting rules
@kevinclark
kevinclark / gist:a8f9442eea9d5bb37a53506854ad9959
Last active March 2, 2020 17:25
Gradle 6 wrapper generation fails due to wpilib extension repository name
[shuffleboard] ➔ gradle wrapper --stacktrace
> Configure project :
UI tests will not be run due to TestFX being broken when headless on Java 10.
See: https://github.com/javafxports/openjdk-jfx/issues/66
UI tests will not be run due to TestFX being broken when headless on Java 10.
See: https://github.com/javafxports/openjdk-jfx/issues/66
UI tests will not be run due to TestFX being broken when headless on Java 10.
See: https://github.com/javafxports/openjdk-jfx/issues/66
UI tests will not be run due to TestFX being broken when headless on Java 10.
@kevinclark
kevinclark / gist:16c0c1f6505d8dcc45de3f5f99ad0a48
Created March 2, 2020 17:09
gradle 5 failure with openjdk13
[shuffleboard] ➔ ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-5.0-bin.zip
.................................................................................
Welcome to Gradle 5.0!
Here are the highlights of this release:
- Kotlin DSL 1.0
- Task timeouts
- Dependency alignment aka BOM support
FROM ubuntu
RUN apt-get update
RUN apt-get install -y curl
RUN curl -L https://github.com/coreos/etcd/releases/download/v0.1.0/etcd-v0.1.0-Linux.tar.gz -o etcd-v0.1.0.tar.gz
RUN tar -C /tmp -xzvf etcd-v0.1.0.tar.gz
@kevinclark
kevinclark / index.go
Last active December 19, 2015 18:19
I'd like to support switching out the indexing.DocId typedef (see indexing/index.go). Currently my tests (indexing/index_test.go) assume a uint64 DocId but the code is currently defined as having a uint32 DocId. I want to be able to switch between the two in tests so that I can see that changing the typedef actually changes the output format.
package indexing
import (
"bufio"
"encoding/binary"
"errors"
"fmt"
"io"
"strings"
)
<?
include("connectdb.php");
// Show the source if asked
if ($HTTP_GET_VARS['src'] == 1) { highlight_file($SCRIPT_FILENAME); return;}
if ( ($con = db_connect()) == false ) die ( "SQL connection failed");
//$query = "select top 1 from issues where active = '1' order by issuenum desc";
$query = "select * from issues where active = '1' order by issuenum desc";
$result = mysql_query($query);

On Failure and Flow

It was so simple. All you wanted was a local copy of your browser history so you could read offline. So you hacked up a script and it worked pretty well. But there were gaps. Sometimes pages didn't work by the time you tried to download them. Sometimes the server errored out. Once, the jerk next door dug up a cable line and your net connection went down entirely.

Errors are going to happen, so how do you handle them in code?

widmore.entityTypes.<entity>.<stat> (60) = sum widmore.*.WidmorePipelineStage.entityTypes.<entity>.<stat>
widmore.all.rates.m<min> (60) = sum widmore.*.Governor.processed.<min>MinuteRate
widmore.all.latency.<pctile>th (60) = avg widmore.*.Governor.processed.<pctile>percentile
looking-glass.all.rates.<stat>.m<min> (60) = sum looking-glass.*.Downloader.<stat>.<min>MinuteRate
looking-glass.all.latency.<stat>.<pctile>th (60) = avg looking-glass.*.Downloader.<stat>.<pctile>percentile
hydra.all.rates.putDocuments.m<min> (60) = sum hydra.*.com.greplin.index.server.IndexServlet.putDocuments.<min>MinuteRate
hydra.all.rates.search.m<min> (60) = sum hydra.*.com.greplin.index.server.IndexServlet.commandLatency.search.<min>MinuteRate
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.greplin.pusher</groupId>
<artifactId>pusher</artifactId>
<version>1.0-SNAPSHOT</version>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.greplin.pusher.WorkerSpec
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.376 sec <<< FAILURE!
Results :
Failed tests:
A Worker with an item in its source should::push a notification(com.greplin.pusher.WorkerSpec): The mock was not called as expected: