Skip to content

Instantly share code, notes, and snippets.

@yanndegat
yanndegat / srfi-115.ss
Created March 6, 2021 20:50
gerbil srfi 115 issue
(import :std/srfi/115) [47/1454]
;; URL parsing regexp
;; this is roughly following the regexp in Appendix B of rfc 3986, except for using
;; `*' instead of `+' for the scheme part (it is checked later anyway, and
;; we don't want to parse it as a path element), and the user@host:port is
;; parsed here.
(define rx-url
(regexp '(+ bos
(?? ($ (* (~ (":/?#")))) ":") ; 1- scheme opt
@yanndegat
yanndegat / std-pregexp.rkt
Last active March 6, 2021 20:03
std-pregexp.rkt
#lang racket
(require net/url)
(define ipv6-hex "[0-9a-fA-F:]*:[0-9a-fA-F:]*")
(define url-regexp
(pregexp (string-append
"^"
FROM centos:centos7
ARG GAMBIT_VERSION=v4.9.3
ARG GERBIL_VERSION=v0.16
ARG LIBYAML_VERSION=0.2.4
ARG OPENSSL_VERSION=1.1.0f
RUN yum groupinstall -y 'Development Tools'
RUN yum install -y epel-release
RUN yum update -y
@yanndegat
yanndegat / main.tf
Last active August 27, 2019 13:52
k8s local storage provisioner in terraform instead of helm
resource "kubernetes_service_account" "localvol" {
metadata {
name = "${var.storage_class_name}-admin"
namespace = var.namespace
}
}
resource "kubernetes_storage_class" "localvol" {
metadata {
name = var.storage_class_name
@yanndegat
yanndegat / main.tf
Created April 4, 2018 08:24
attach vol is lost after resize
variable "flavor_name" {
default = "c2-7"
}
provider "openstack" {
region = "GRA3"
}
# Import Keypair
resource "openstack_compute_keypair_v2" "keypair" {
@yanndegat
yanndegat / ec2ansibleinv.sh
Created April 28, 2017 11:26
ec2 instances to ansible inventory using jq
#!/bin/bash
STACK=$1
aws ec2 describe-instances | jq -r \
'[
.Reservations[].Instances[]
| . as $node
| {
ip: ($node.NetworkInterfaces[0].PrivateIpAddress),
name: ($node.Tags[] | select(.Key == "Name").Value),

Keybase proof

I hereby claim:

  • I am yanndegat on github.
  • I am parasitid (https://keybase.io/parasitid) on keybase.
  • I have a public key whose fingerprint is 6C42 CE73 C713 28B0 8609 AF2F 1604 A5E0 22A2 D1D0

To claim this, I am signing this object: