This script demonstrates badge signing.
-
Create a environment to run the script:
$ python -m venv venv $ . ./venv/bin/activate
-
Install the required dependencies
{ | |
storage file_system ./caddy/ | |
debug | |
pki { | |
ca pyroclastic { | |
name "Pyroclastic Cloud" | |
} | |
} | |
} |
1 001 | |
2 002 | |
3 003 | |
4 004 | |
5 005 | |
6 006 | |
7 007 | |
8 008 | |
9 009 | |
10 00A |
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/carlmjohnson/crockford" | |
) | |
func encodeInt64(value int64) string { |
# Your main nginx config file. | |
http { | |
# Existing configuration… | |
# Enable blocks based on IPs used by Fediverse instance domain names. | |
include /etc/nginx/blocklist-ip.conf; | |
} |
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"os" | |
"github.com/kr/pretty" |
// (c) 2019 Nick Gerakines | |
// This code is licensed under MIT license | |
#include <signal.h> | |
#include <thread> | |
#include <chrono> | |
#include "cpprest/http_listener.h" | |
using namespace std; | |
using namespace web; |
cmake_minimum_required(VERSION 3.7) | |
project(main) | |
set(CMAKE_BUILD_TYPE Debug) | |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall") | |
set(cpprestsdk_DIR /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/cmake/) | |
find_package(cpprestsdk CONFIG REQUIRED) | |
find_package(Boost COMPONENTS system REQUIRED) |
FROM ubuntu as build | |
RUN apt-get update && apt-get install -y build-essential git cmake autoconf libtool pkg-config libcpprest-dev libcpprest | |
WORKDIR /src | |
COPY CMakeLists.txt main.cpp ./ | |
RUN cmake . && make | |
FROM ubuntu as app | |
RUN apt-get update && apt-get install -y libcpprest | |
WORKDIR /app | |
COPY --from=build /src/main ./ |