Skip to content

Instantly share code, notes, and snippets.

View michaelneale's full-sized avatar
Not updating github status

Michael Neale michaelneale

Not updating github status
View GitHub Profile
michaelneale / example_usage.go
Created December 9, 2022 02:02
ChatGPT writes a golang key/value store abstraction
View example_usage.go
store := &InMemoryKVStore{data: make(map[string]string)}
store.Set("key1", "value1")
value, err := store.Get("key1")
if err != nil {
// handle error
results, err := store.Query("value")
if err != nil {
// handle error

Explain code

This uses AI to read and try and understand the code, and explain it back to you:


curl --request POST --header 'Content-Type: application/json' \
View Riddle Solver
This is a riddle solver.
Riddle: Whats black and white and red all over?
Answer: A newspaper
Riddle: What dries by getting wet?
Answer: A towel
View Jenkinsfile
def honeycomb_setup() {
script {
env.STEP_START = sh(script:'date +%s', returnStdout: true).trim()
env.STEP_SPAN_ID = sh(script:'uuidgen', returnStdout: true).trim()
def install_buildevents() {
curl -L -o buildevents curl -L -o buildevents
chmod 755 buildevents
import streamlit as st
import pandas as pd
import altair as alt
import urllib
from streamlit.server.server import Server
from streamlit.report_thread import get_report_ctx
def get_UN_data():
View Google Cloud Functions IAM
import base64
import os
from google.oauth2 import service_account
import googleapiclient.discovery
def hello_pubsub(event, context):
# need to install stuff - selenium/webdriver/firefox driver/gecko or something, I forget now.
# Just mash the keyboard until it works.
from selenium import webdriver
options = webdriver.FirefoxOptions()
View PSConfig.groovy
//def ConfigEnviroment = [:]
//ConfigEnviroment['fromEmail'] = ""
def info(message) {
echo "INFO: ${message}"
def warning(message) {
echo "WARNING: ${message}"
View Jenkinsfile
pipeline {
stages {
stage('cypress - test') {
agent {
docker {
image 'cypress/base:8'
View gist:48d032ee6a0cc4d61e6456e80db4ad27
apiVersion: v1
items: []
kind: List
resourceVersion: ""
selfLink: ""