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
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
michaelneale / example_usage.go
Created December 9, 2022 02:02
ChatGPT writes a golang key/value store abstraction
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
michaelneale / gist:491134409fa7a1c32119
Created July 2, 2014 07:18
Enable SSHD in docker container via systemd in arch
RUN pacman -Sqyu --noconfirm --needed openssh && \
systemctl enable sshd
# configure ssh
RUN sed -i \
-e 's/^#*\(PermitRootLogin\) .*/\1 yes/' \
-e 's/^#*\(PasswordAuthentication\) .*/\1 yes/' \
-e 's/^#*\(PermitEmptyPasswords\) .*/\1 yes/' \
-e 's/^#*\(UsePAM\) .*/\1 no/' \

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' \
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
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():
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()
//def ConfigEnviroment = [:]
//ConfigEnviroment['fromEmail'] = ""
def info(message) {
echo "INFO: ${message}"
def warning(message) {
echo "WARNING: ${message}"