Things needed:
- A domain that is tied to Cloudflare (free CF account is probably enough, depends on the load to your CDN)
- Make a Cloudflare R2 bucket > Take a note of its bucket name.
Things needed:
jA0ECQMCkewmFwhXEF7a0q8Brk+gBttvaSpDiTpk/triurvh5xipY5ydUGM7ayiY
pdzvgF4nTfBPAQRhG+R5IY0kVBLJ/ke0ZwwbPVPS3NABvz6wLOblc70LcTJTrIzQ
3QcSX0WFnrbUat6NRfWRZLhKMP8MlawMNDQY1mD/ZmCIPC/daHkzSA48lQAqJir1
K9D04J5Eq138dWJb7vWX8hSSCi7QLE8zg7157d5MmoF0mlwW7SsuZF7pQOD7xEOy
=brT2
| //go:build darwin | |
| package common | |
| /* | |
| #cgo CFLAGS: -x objective-c | |
| #cgo LDFLAGS: -framework Cocoa | |
| #import <Cocoa/Cocoa.h> | |
| int |
| #!/bin/sh | |
| set -e | |
| # Zone | |
| ZONE=europe-west8-a | |
| echo "Destroying cloud Ubuntu Desktop..." | |
| gcloud compute instances delete ubuntu-desktop --zone=$ZONE --quiet |
| #include <linux/seq_file.h> | |
| KHOOK_EXT(int, loadavg_proc_show, struct seq_file *, void *v); | |
| static int khook_loadavg_proc_show(struct seq_file *m, void *v) | |
| { | |
| unsigned int random_number; | |
| unsigned char rands[sizeof(unsigned int)]; | |
| get_random_bytes(rands, sizeof(unsigned int)); | |
| random_number = *(unsigned int*)rands; | |
| random_number = (random_number % 6) + 14; | |
| seq_printf(m, "0.%d 0.16 0.11 1/127 10420\n", random_number); |
| package logrus2telegram | |
| import ( | |
| "fmt" | |
| "time" | |
| tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" | |
| "github.com/sirupsen/logrus" | |
| "errors" |
| package ginlogrus | |
| import ( | |
| "fmt" | |
| "math" | |
| "net/http" | |
| "os" | |
| "time" | |
| "github.com/gin-gonic/gin" |
| package gormlogrus | |
| import ( | |
| "context" | |
| "errors" | |
| "time" | |
| "github.com/sirupsen/logrus" | |
| "gorm.io/gorm" | |
| gormlogger "gorm.io/gorm/logger" |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "io" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| "time" |
| var validatorInterceptor = connect.UnaryInterceptorFunc( | |
| func(next connect.UnaryFunc) connect.UnaryFunc { | |
| return connect.UnaryFunc(func(ctx context.Context, request connect.AnyRequest) (connect.AnyResponse, error) { | |
| validator, ok := request.Any().(interface{ ValidateAll() error }) | |
| if !ok { | |
| // Handle this however you'd like; maybe return an error with | |
| // CodeInternal if all your types should support validation? | |
| return next(ctx, request) | |
| } | |
| if err := validator.ValidateAll(); err != nil { |