Skip to content

Instantly share code, notes, and snippets.

View ndpar's full-sized avatar

Andrey Paramonov ndpar

View GitHub Profile
@ndpar
ndpar / regex.groovy
Created December 20, 2017 23:08
URL Parser in Groovy
def subDomain = '(?i:[a-z0-9]|[a-z0-9][-a-z0-9]*[a-z0-9])' // simple regex in single quotes
def topDomains = $/
(?x-i : com \b # you can put whitespaces and comments
| edu \b # inside regex in eXtended mode
| biz \b
| in(?:t|fo) \b # backslash is not escaped
| mil \b # in dollar-slash strings
| net \b
| org \b
| [a-z][a-z] \b
#lang racket
(module+ test
(require rackunit))
(define ⊕ bitwise-xor)
(define hex
(curryr number->string 16))
HOME = .
RANDFILE = $ENV::HOME/.rnd
####################################################################
[ ca ]
default_ca = CA_default # The default ca section
[ CA_default ]
default_days = 730 # how long to certify for