Skip to content

Instantly share code, notes, and snippets.

View tigertv's full-sized avatar
👍
Welcome!

Max Vetrov tigertv

👍
Welcome!
View GitHub Profile
@creack
creack / main.go
Created January 7, 2018 17:30 — 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"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@enricofoltran
enricofoltran / main.go
Last active October 3, 2024 14:08
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"
@mbinna
mbinna / effective_modern_cmake.md
Last active November 13, 2024 23:24
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@seanjensengrey
seanjensengrey / tiny.c
Last active September 3, 2024 17:58
Marc Feeley Tiny C compiler
/* file: "tinyc.c" */
/* originally from http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c */
/* Copyright (C) 2001 by Marc Feeley, All Rights Reserved. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active November 16, 2024 11:48
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@laobubu
laobubu / ABOUT.md
Last active October 16, 2024 06:05
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
#EXTINF:-1,[COLOR green]» » GRUPO FILMES « «[/COLOR]
http://0.0.0.0:1234
#EXTINF:-1 group-title="FILMES",101 DALMATIONS
http://www.deadlyblogger.com/NewRelease/dal1.mp4
#EXTINF:-1 group-title="FILMES",A CHRISTMAS CAROL
http://www.deadlyblogger.com/NewRelease/acc2009.mp4
#EXTINF:-1 group-title="FILMES",A DISNEY CHRISTMAS GIFT
http://www.deadlyblogger.com/NewRelease/disneyc1.mp4
#EXTM3U
#EXTINF:-1,group-title="Movies on demand"
http://kewltv.net/
#EXTINF:-1,xmen1
http://www.deadlyblogger.com/NewRelease/xmen1.mp4
#EXTINF:-1,xmen2
http://www.deadlyblogger.com/NewRelease/xmen2.mp4
#EXTINF:-1,xmen3
http://www.deadlyblogger.com/NewRelease/xmen3.mp4
#EXTINF:-1,xmen origin
@kevinkreiser
kevinkreiser / logging.hpp
Last active April 17, 2024 13:25
Thread-safe logging singleton c++11
#ifndef __LOGGING_HPP__
#define __LOGGING_HPP__
/*
Test this with something like:
g++ -std=c++11 -x c++ -pthread -DLOGGING_LEVEL_ALL -DTEST_LOGGING logging.hpp -o logging_test
./logging_test
*/
#include <string>