Skip to content

Instantly share code, notes, and snippets.

View serverhorror's full-sized avatar

serverhorror serverhorror

  • Earth
View GitHub Profile
@serverhorror
serverhorror / script.sh
Last active October 2, 2024 13:34
git-multi-repo-statistics
#!/bin/sh
# shellcheck disable=SC2044
for repo in $(find . -mindepth 1 -maxdepth 1 -type d); do
if [ ! -d "$repo/.git" ]; then
continue
fi
(
git -C "$repo" shortlog --group=':%aE' -s
) | cat
@serverhorror
serverhorror / HttpProxy.go
Created August 28, 2023 09:10 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@serverhorror
serverhorror / main.go
Last active January 12, 2023 20:58 — forked from cnunciato/main.go
Converting a pulumi.IDOutput to a string and using it in a lookup function
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
@serverhorror
serverhorror / 80x24.txt
Last active May 17, 2024 17:32
80 x 24 to prepare screencast
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
x x
x 80x24 x
x x
x x
x x
x x
x x
x x
x x
@serverhorror
serverhorror / example.ipynb
Created February 14, 2020 09:52 — forked from pelson/example.ipynb
Example of authenticating a GitHub app using jwt in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@serverhorror
serverhorror / aws-transfer-sftp.yaml
Created February 3, 2020 17:16 — forked from glnds/aws-transfer-sftp.yaml
CloudFormation template for AWS Transfer for SFTP
---
AWSTemplateFormatVersion: '2010-09-09'
Description: some-sftp-server
Parameters:
HostedZoneIdParam:
Type: String
Description: Hosted Zone ID
SFTPHostnameParam:
Type: String
CREATE SEQUENCE REVISION_SEQ
START WITH 1
INCREMENT BY 1
;
CREATE TABLE REVISION
(
REVISION_NR BIGINT NOT NULL ,
CREATED_AT TIMESTAMP WITH TIME ZONE ,
CREATED_BY UUID NOT NULL ,
from __future__ import print_function
import os
import sys
class model():
""" This is the django base model class, just for this example!
"""
// +build linux
package pb
//go:generate protoc -I . -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. stool.proto
//go:generate protoc -I . -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:. stool.proto
//go:generate protoc -I . -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --swagger_out=logtostderr=true:. stool.proto
func handleRead(l *zap.Logger, s storage.Interface, pbRead *pb.Read, rdr io.Reader) (io.Writer, error) {
l.Info("(pb.ReadRequest_Read)",
zap.String("type", fmt.Sprintf("%T", pbRead)),
zap.String("value",
fmt.Sprintf("%v", pbRead)),
)
rd, err := read.TranscribeFromPbRead(pbRead)
if err != nil {
return nil, err
}