This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const pgzx = @import("pgzx"); | |
const pg = pgzx.c; | |
comptime { | |
pgzx.PG_FUNCTION_V1("dummy_fdw_handler", dummy_fdw_handler); | |
//pgzx.PG_FUNCTION_V1("dummy_fdw_validator", dummy_fdw_validator); | |
} | |
fn dummy_fdw_handler() pg.Datum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const pgzx = @import("pgzx"); | |
const pg = pgzx.c; | |
const fdw = pgzx.fdw; | |
const pq = pgzx.pq; | |
// postgres_fdw options not related to connection or transaction handling. | |
const postgres_fdw_options = fdw.OptionList.init(&[_]fdw.Option{ | |
fdw.Option.init("xact_handler", pg.ForeignDataWrapperRelationId, pgfdwValidatorXactHandler), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const pgzx = @import("pgzx"); | |
const pg = pgzx.c; | |
const fdw = pgzx.fdw; | |
const pq = pgzx.pq; | |
// postgres_fdw options not related to connection or transaction handling. | |
const postgres_fdw_options = fdw.OptionList.init(&[_]fdw.Option{ | |
fdw.Option.init("xact_handler", pg.ForeignDataWrapperRelationId, pgfdwValidatorXactHandler), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
""" GDB 'allgoroutines' command for executing gdb command within the context of every goroutine at once """ | |
class GoroutineStacks(gdb.Command): | |
"Print stacktrace for all goroutines." | |
def __init__(self): | |
gdb.Command.__init__(self, "allgoroutines", gdb.COMMAND_STACK, gdb.COMPLETE_NONE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import argparse | |
import time | |
import curses | |
def main(): | |
parser = argparse.ArgumentParser( | |
description="Print per second stats from expvars") | |
parser.add_argument("url", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\setuppapersize[A4][A4] | |
\setuplayout[location=middle, marking=on, | |
header=1.5em, | |
topspace=2cm, headerdistance=1.5cm, | |
backspace=3.2cm, cutspace=3.5cm, | |
bottomdistance=1cm, height=middle, width=middle, | |
leftmargindistance=0.25cm, rightmargindistance=0.25cm, | |
leftedgedistance=1.5cm, rightedgedistance=0cm, | |
leftedge=0cm, rightedge=1cm, | |
leftmarginwidth=2cm, rightmargin=3cm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE PackageImports #-} | |
{-# LANGUAGE GADTs, StandaloneDeriving#-} | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Monad.Identity | |
import Data.Typeable | |
type PlayerNumber = Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module MyLang where | |
import Prelude (($),(.)) | |
import qualified Prelude as P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE GADTs #-} | |
module MyLang where | |
import Prelude (Integer(..), Show(..),String(..)) | |
import qualified Prelude as P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PackageImports #-} | |
import Control.Applicative (Applicative,(<*>),(<$>),pure) | |
import Control.Monad (ap,join) | |
import "mtl" Control.Monad.Trans (liftIO) | |
import "mtl" Control.Monad.Reader (ReaderT,runReaderT,ask) |