Skip to content

Instantly share code, notes, and snippets.

@demming
demming / porkbun-domains-openapi.yaml
Created November 3, 2022 08:27
An unofficial Porkbun.com OpenAPI description for the Porkbun API, see <https://porkbun.com/api/json/v3/documentation>. Among other things, it can be used - as a foundation to implement a dynamic DNS service, - for managing DNS records, - keeping track on domain pricing, or - for controlling your domains registered with Porkbun domains. As per u…
openapi: 3.0.3
info:
title: Porkbun.com OpenAPI Description
description: |
An unofficial Porkbun.com OpenAPI description for the Porkbun API, see <https://porkbun.com/api/json/v3/documentation>.
Among other things, it can be used
- as a foundation to implement a dynamic DNS service,
- for managing DNS records,
- keeping track on domain pricing, or
-- Based on: http://augustss.blogspot.com/2007/10/simpler-easier-in-recent-paper-simply.html
import Data.List (delete, union)
{- HLINT ignore "Eta reduce" -}
-- File mnemonics:
-- env = typing environment
-- vid = variable identifier in Bind or Var
-- br = binder variant (Lambda or Pi)
-- xyzTyp = type of xyz
-- body = body of Lambda or Pi abstraction
@demming
demming / snippet-profile-int_length.cpp
Created November 17, 2013 12:32
A snippet to profile my int_length algorithm. There's a limitation as it's purely numerical in its approach. But we still can partition integers and transitorily store them in strings or char arrays. Add -lboost_timer -lboost_system. Vectors will get very large so make sure to reserve() sufficient memory in advance.
boost::timer::cpu_timer bcput;
boost::timer::nanosecond_type bcput_diff;
// std::vector<boost::timer::nanosecond_type> times_int_length, times_strlen;
boost::timer::nanosecond_type times_strlen_sum = 0, times_strlen_sum_full = 0, times_int_length_sum = 0;
std::cout << "Starting manual profiling " << std::endl;
std::string int_str;
for(ullong i = INT_MAX; i < UINT_MAX; i+=1024)
{