Skip to content

Instantly share code, notes, and snippets.

@apeiros
apeiros / literalparser.rb
Created July 22, 2011 20:13
Parse literals to ruby objects
require 'strscan'
require 'bigdecimal'
# This is copied and slightly refactored from BareTest::TabularData
#
# Example
# LiteralParser.parse("nil") # => nil
# LiteralParser.parse(":foo") # => :foo
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active July 14, 2024 19:55
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@nonamenix
nonamenix / hug_swagger.py
Last active April 5, 2019 19:37
Swagger specification for hug. Ugly draft.
import inspect
import collections
from collections import OrderedDict
import hug
import logging
from apispec import APISpec
from apispec.ext.marshmallow.swagger import field2parameter
from copy import copy