Skip to content

Instantly share code, notes, and snippets.

View donvito's full-sized avatar
🚀
Software Engineer coding with Go, Python and Generative AI

Melvin Vivas donvito

🚀
Software Engineer coding with Go, Python and Generative AI
View GitHub Profile
@w00kie
w00kie / index.ts
Last active September 16, 2024 03:42
Cloudflare Worker that bundles R2 objects in a Zip file
import { z } from 'zod';
import { ZipWriter, BlobReader, configure } from '@zip.js/zip.js';
// Without this, we get uncaught error due to Workers runtime bug
// See: https://github.com/gildas-lormeau/zip.js/discussions/514
configure({
useCompressionStream: false,
});
// Payload schema that lists the files to be bundled, their filenames and the archive filename
package main
import (
"encoding/json"
"fmt"
"log"
"github.com/graphql-go/graphql"
)
@aelbore
aelbore / typescript-web-components.md
Last active June 23, 2024 01:17
Step by Step creating web components in typescript using rollup

Getting Started

  • Install Dependencies
    npm init
    npm install --save-dev ts-node typescript tslib express @types/express
    

Create your web server

  • Create server.ts in root folder of your app.
@mholt
mholt / macapp.go
Last active August 20, 2024 06:02
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@a-h
a-h / buildspec.yml
Last active November 3, 2022 08:31
Build Go with private dependencies on AWS CodeBuild
version: 0.2
env:
parameter-store:
build_ssh_key: "build_ssh_key"
phases:
install:
commands:
- mkdir -p ~/.ssh
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@davidvthecoder
davidvthecoder / CSVwriterExample
Created October 9, 2013 18:32
Golang CSV Writer Example for a Web Application - Warning No error handling, just the basic concept.
import (
"../../web"
"bytes"
"encoding/csv"
}
func GenerateCSV(ctx *web.Context, args ...string) {
record := []string{"test1", "test2", "test3"} // just some test data to use for the wr.Writer() method below.
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real