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 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"
@m00zi
m00zi / haproxy.cfg
Created August 20, 2020 12:26 — forked from Xstasy/haproxy.cfg
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
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;
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(
@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"
)
@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 / recipe.example.md
Created October 24, 2019 07:56 — forked from peterbsmyth/recipe.example.md
Making chained API Calls using @ngrx/Effects

Making chained API Calls using @ngrx/Effects

Purpose

This recipe is useful for cooking up chained API calls as a result of a single action.

Description

In the below example, a single action called POST_REPO is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:

  1. POST a new repostiry
  2. GET the master branch of the new repository
  3. GET the files on the master branch
@m00zi
m00zi / recipe.example.md
Created October 24, 2019 07:56 — forked from peterbsmyth/recipe.example.md
Making chained API Calls using @ngrx/Effects

Making chained API Calls using @ngrx/Effects

Purpose

This recipe is useful for cooking up chained API calls as a result of a single action.

Description

In the below example, a single action called POST_REPO is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:

  1. POST a new repostiry
  2. GET the master branch of the new repository
  3. GET the files on the master branch
app/
|- app.module.ts
|- app-routing.module.ts
|- core/
|- auth/
|- auth.module.ts (optional since Angular 6)
|- auth.service.ts
|- index.ts
|- othermoduleofglobalservice/
|- ui/

CSS Grid Admin Dashboard

A dashboard-style admin interface built using CSS Grid, with a Flexbox fallback for older browsers.

A Pen by Max Böck on CodePen.

License.