Skip to content

Instantly share code, notes, and snippets.

View mchirico's full-sized avatar
💭
Kubernetes... API Server Development

Mike Chirico mchirico

💭
Kubernetes... API Server Development
View GitHub Profile
@mchirico
mchirico / bridge.go
Created April 7, 2023 15:30
Go Bridge Pattern
package main
import "fmt"
// CollectorInterface defines the interface for the collector abstraction
type CollectorInterface interface {
Collect()
SetResolver(ResolverInterface)
}
image := "us-central1-docker.pkg.dev/mchirico/public/dopt"
version := "v0.0.1"
tag.ImageVersion(image, version)
currentDir, err := os.Getwd()
if err != nil {
return
}
# This fixed slowness
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app
//
// SqliteBroker.swift
// tv
//
// Created by Michael Chirico on 9/29/18.
// Copyright © 2018 Michael Chirico. All rights reserved.
//
/*
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
import UIKit
var z:[String:String] = [:]
z["Zoe"] = "Mouse lover..."
struct Z {
var z:[String:String]
func pr() -> String {
import UIKit
struct Session {
var url: String
func Get(completion: @escaping (_ result: String) -> Void, onFailure: () -> Void) {
let configuraion = URLSessionConfiguration.default
let session = URLSession(configuration: configuraion)
guard let _url = URL(string: url) else { fatalError()}
import SwiftUI
struct ContentView: View {
@State var count: Int = 0
@State var txt: String = "Label:"
var body: some View {
VStack {
Label(self.txt, systemImage: /*@START_MENU_TOKEN@*/"42.circle"/*@END_MENU_TOKEN@*/)
HStack {
Button(action: {
import SwiftUI
struct ContentView: View {
@State var count: Int = 0
@State var txt: String = ""
var body: some View {
VStack {
Label(self.txt, systemImage: /*@START_MENU_TOKEN@*/"42.circle"/*@END_MENU_TOKEN@*/)
HStack {
package main
import (
"io"
"log"
"net/http"
"os"
)
func main() {