Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Kubernetes... API Server Development

Mike Chirico mchirico

💭
Kubernetes... API Server Development
View GitHub Profile
View vscodeslow.sh
# This fixed slowness
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app
View sqlitebroker.swift
//
// SqliteBroker.swift
// tv
//
// Created by Michael Chirico on 9/29/18.
// Copyright © 2018 Michael Chirico. All rights reserved.
//
/*
View Spreadsheet.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
View day6.swift
import UIKit
var z:[String:String] = [:]
z["Zoe"] = "Mouse lover..."
struct Z {
var z:[String:String]
func pr() -> String {
View url 2 calls.swift
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()}
View Day 4 version3.swift
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: {
View Day 4 version2.swift
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 {
View https.go
package main
import (
"io"
"log"
"net/http"
"os"
)
func main() {
@mchirico
mchirico / server.go
Last active Aug 27, 2020
Simple Go Web Server
View server.go
package main
import (
"log"
"net/http"
)
func main() {
log.Println("starting server...")
http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`Hello world`))
})
View main.go
/*
go get ./...
go run *.go -kubeconfig=/home/runner/.kube/config