Skip to content

Instantly share code, notes, and snippets.

View itkovian's full-sized avatar

Andy Georges itkovian

View GitHub Profile
@azet
azet / testing.md
Last active August 29, 2015 14:09
Third-party apps to use when publishing a F/OSS project on GitHub et al.
@NicolasT
NicolasT / quickcheck_c.hs
Created October 18, 2010 00:57
A demonstration of using QuickCheck to test C code
-- This is a snippet cut-and-paste from a larger code body, might not compile or
-- work as expected as such
import Prelude hiding (pi)
import Data.Bits
import Data.Word (Word32)
import Foreign.C.Types (CSize)
import Foreign.Marshal.Array (withArrayLen)

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }
@rudelm
rudelm / autofs.md
Last active April 23, 2024 18:17
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service