Skip to content

Instantly share code, notes, and snippets.


Jeroen Bransen jbransen

  • Utrecht, The Netherlands
View GitHub Profile
View ProxySqlTest.hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Database.MySQL.Base
import qualified System.IO.Streams as Streams
import Control.Monad
main :: IO ()
jbransen / a-transip-zone-export.php
Last active Nov 20, 2019
Exporting a DNS Zone file from the TransIP API
View a-transip-zone-export.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>";
View ConcurrentReadOrderedWrite.hs
{-# 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
You can’t perform that action at this time.