Skip to content

Instantly share code, notes, and snippets.

View rtyler's full-sized avatar

R. Tyler Croy rtyler

View GitHub Profile
➜ ~ llm chat -m mistral-7b-openorca
Chatting with mistral-7b-openorca
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> Complete the sentence "Papa is..."
Papa is a loving and caring father who provides emotional support and guidance
to his children, while also working hard to ensure their needs are met. He takes pride in being an involved parent and cherishes every moment spent with his family.
> Complete the sentence "Uncle is..."
Uncle is a supportive and fun-loving relative who enjoys spending time with his nieces and nephews, sharing laughter and creating cherished memories. He provides guidance and wisdom to the younger generation while also being a source of
entertainment and joy in their lives.<|im_end|><|im_start|>user
rtyler /
Created July 21, 2023 06:51 for fetching dat tests
//! Build script for DAT
use std::fs::File;
use std::io::{BufReader, BufWriter, Write};
use std::path::Path;
use flate2::read::GzDecoder;
use tar::Archive;
const DAT_EXISTS_FILE_CHECK: &str = "tests/dat/.done";
rtyler /
Created January 29, 2021 00:35
A simple Python script for copying an organization's repositories
#!/usr/bin/env python3
# Requires
# Set the GITHUB_TOKEN to a personal access token with all repo scopes
import os
import subprocess
import sys
rtyler / 0_readme.adoc
Created December 7, 2020 00:05
I want your Jenkins declarative pipeline!

I want your Declarative Pipeline!

I’m working on a grammar and parser for declarative Jenkins Pipelines called Jenkins Declarative Parser. In order to make this parser work well, I need real-world declarative `Jenkinsfile`s, that’s where you come in!

If you have a Jenkinsfile which you’re allowed to share publicly, follow these steps:

  • Create a new directory inside the data/valid directory

  • Add your Jenkinsfile to the directory

rtyler / 0_about.adoc
Created November 27, 2020 20:04
An example of Otto running its own tests

Sorta-self-hosted Otto

Below is a transcript from a local installation of Otto with the parser service, the "local-orchestrator" service, a local agent, and steps. This is fairly simple, but it represents an end-to-end integration test of Otto 👏


  1. Clone Otto

  2. cargo build

  3. make steps build the steps libraries

rtyler / complex.groovy
Created November 7, 2020 23:19
Exploring syntax for more root verbs in Otto (.groovy just for syntax highlighting)
use stdlib
environment {
pipeline {
// Parallel will build all sub-stages concurrently without stopping if one
// fails. Any of the stages failing will halt the pipeline after the parallel
// however
parallel {
rtyler / 0_prereq.adoc
Last active October 29, 2020 18:48
Simple Otto step library testing


  • Have a rust compiler set up

  • make steps will package all the steps up for you

  • mkdir tmp && for f in *.tar.gz; do tar -zxvf $f -C tmp; done will prepare the tmp/ directory with those step libraries extracted

Then you should be able ro invoke the test-pipeline.yml with the following command:

rtyler / 0_readme.adoc
Last active June 22, 2020 20:59
Reproduction steps for a locking issue with async-std 1.6.x and hotdog

Reproducing the issue

  • git clone -b performance-regression-41

  • cd hotdog

  • docker-compose up (not needed for the runtime test, but 🌭 needs Kafka to start)

  • cargo build --release

  • Run 🌭 with RUST_LOG=info ./target/release/hotdog -c hotdog-loadtest.yml

  • In two terminates, paste: ./scripts/generate-stdout.rb 100000 | time openssl s_client -connect localhost:6514

  • Try to run them both in parallel as much as possible.

  • While they’re running, you should see the dots slow in one terminal and even stop.

#!/usr/bin/env ruby
require 'json'
require 'socket'
require 'openssl'
def format_syslog(buffer)
'<13>1 2020-04-18T15:16:09.956153-07:00 coconut tyler - - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="505061"] ' + buffer + "\n"
rtyler / 0.log
Created June 6, 2020 22:01
Playing around with syntax sugar around handling websocket messages
INFO otto_eventbus > Listening for WebSocket connections on
DEBUG tungstenite::handshake::server > Server handshake done.
DEBUG otto_eventbus > Received: Ok(Text("{\"type\":\"ping\", \"value\" : {\"msg\":\"hi\"}}"))
INFO otto_eventbus > deser: Meow { ttype: "ping", value: Object({"msg": String("hi")}) }
DEBUG otto_eventbus > Handling: Ping { msg: "hi" }
DEBUG otto_eventbus > Received: Ok(Text("{\"type\":\"hello\",\"value\": null}"))
INFO otto_eventbus > deser: Meow { ttype: "hello", value: Null }
DEBUG otto_eventbus > Handling hello: Hello