Skip to content

Instantly share code, notes, and snippets.

View jbransen's full-sized avatar

Jeroen Bransen jbransen

  • Utrecht, The Netherlands
View GitHub Profile
@jbransen
jbransen / a-transip-zone-export.php
Last active September 10, 2023 14:34
Exporting a DNS Zone file from the TransIP API
<?php
require __DIR__ . '/vendor/autoload.php';
use Badcow\DNS\Zone;
use Badcow\DNS\Rdata\Factory;
use Badcow\DNS\ResourceRecord;
use Badcow\DNS\AlignedBuilder;
// Login details, fill those in with your TransIP username, the file containing
// your private key, and the domain you would like to export
Transip_ApiSettings::$login = "<username>";
{-# LANGUAGE BangPatterns #-}
import Control.Monad
import Control.Concurrent
import Control.Concurrent.STM
import Numeric.Natural
type QJob = TBQueue (A, MVar B)
worker :: (A -> B) -> QJob -> IO ()
worker f qjob = forever $ do
@jbransen
jbransen / ProxySqlTest.hs
Created April 3, 2020 17:07
ProxySQL bug #2619
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Database.MySQL.Base
import qualified System.IO.Streams as Streams
import Control.Monad
main :: IO ()