Skip to content

Instantly share code, notes, and snippets.

View Kiskae's full-sized avatar

Kiskae

View GitHub Profile

TL;DR: https://bugs.python.org/issue42967 changed parsing behavior that prometheus exporter used to handle weird ISP router data.

Problem

I've been using https://github.com/mbugert/connectbox-prometheus to collect data from my ISP-provided modem/router. The provided docker image worked fine in December 2020. However when I recently tried using the docker image again it would fail to properly log in and result in an error.

Did the protocol change?

First thought when this occured was an update pushed by the ISP that changes the login protocol for the router.

use std::{convert::Infallible, future, io, marker::PhantomData};
use tokio::{
fs::File,
io::{AsyncBufRead, AsyncBufReadExt, BufReader, Lines},
process::{Child, ChildStderr, ChildStdout},
sync::mpsc,
};
pub trait Interruptable {

Keybase proof

I hereby claim:

  • I am kiskae on github.
  • I am kiskae (https://keybase.io/kiskae) on keybase.
  • I have a public key ASCAjWTUZLjz5kPGlwwgbMky8S8ZDcD-tSEKcIL8zjC0NQo

To claim this, I am signing this object:

@Kiskae
Kiskae / TypeTest.java
Created October 10, 2018 22:17
Attempt to reify a java.lang.model.TypeMirror with code generation. My brain has left the station a few hours ago.
import net.serverpeon.proxy.compiler.types.TypeEncoderTest;
import net.serverpeon.proxy.type.TypeNode;
import net.serverpeon.proxy.util.SimpleNodeFactory;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import kotlin.jvm.internal.markers.KMappedMarker;
open class Parcelable {
interface Creator<P:Parcelable> {
fun createFromParcel(source: Any): P
fun newArray(size: Int): Array<P?>
}
}
class TestParcel : Parcelable()
@Kiskae
Kiskae / gist:3e288976a8a55e53bfc2
Created March 14, 2016 23:31
a.chronus.eu v2 - Feature List

Since I am terrible at managing my own expectations and deadlines, I am putting out a feature-list for Chronus v2 that I can hold myself to implementing.

In general

  • Shrink down the (download size of) site, avoid downloading stuff that hasn't changed.
  • Allow for optional titles to be attached to the countdown. (Thankfully twitter always considers links to be of the same length, so adding that data to the URL won't actually affect twitter-use). (See https://twitter.com/KiskaeEU/status/605338628974383104)
  • Improve usability without having to do to the site
    • Use Twitter Cards to embed an image which shows the title of the countdown as well as a number of reference timezones. (Example: https://twitter.com/KiskaeEU/status/691698265969029120)
    • Support OEmbed and Embedly; This will mean a.chronus.eu URLs will automatically embed in a number of services. (Reddit and Discord support this method I believe)
    • Add embedding mode which strips a countdown of most extranious UI.
  • Make the design work bet
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListenableFutureTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongepowered.api.Game;
import org.spongepowered.api.plugin.PluginContainer;
import org.spongepowered.api.service.scheduler.SchedulerService;
import org.spongepowered.api.service.scheduler.Task;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListenableFutureTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongepowered.api.Game;
import org.spongepowered.api.plugin.PluginContainer;
import org.spongepowered.api.service.scheduler.SchedulerService;
import org.spongepowered.api.service.scheduler.Task;
@Kiskae
Kiskae / patch.diff
Created June 22, 2015 13:00
Patch for Clang built files to export clang targets for linking.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab70f1d..8cbd110 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,13 +526,16 @@ endif()
set(CLANG_ORDER_FILE "" CACHE FILEPATH
"Order file to use when compiling clang in order to improve startup time.")
+
+option(CLANG_EXPORT_TARGETS "Generate CMake export files for external linking"