Skip to content

Instantly share code, notes, and snippets.

View m00zi's full-sized avatar
🎯
Focusing

moss m00zi

🎯
Focusing
View GitHub Profile
@m00zi
m00zi / main.go
Created June 16, 2020 10:02 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@m00zi
m00zi / main.go
Created July 25, 2020 14:18 — forked from montanaflynn/main.go
Gin request timeout middleware and handler
package main
import (
"context"
"log"
"net/http"
"time"
"github.com/gin-gonic/gin"
)
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'network_exceptions.freezed.dart';
@freezed
abstract class NetworkExceptions with _$NetworkExceptions {
const factory NetworkExceptions.requestCancelled() = RequestCancelled;
@m00zi
m00zi / haproxy.cfg
Created August 20, 2020 12:26
Load balancing not working tried with balance roundrobin and balance leastconn in ftp-balancer-pool
# HAPROXY Config for FTP
# my apologies for the spacing
global
log 127.0.0.1 local0 info
chroot /var/lib/haproxy
user haproxy
group haproxy
defaults
log global
@m00zi
m00zi / main.go
Created July 6, 2021 11:28 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"