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 System.Posix.PAM | |
main = do | |
res <- authenticate "system" "user" "pass" | |
case res of | |
Left a -> putStrLn $ "error: " ++ pamCodeToMessage a | |
Right () -> putStrLn "success" |
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
{- | |
File: Lockpattern.hs | |
This programm calculates a pattern for the 3x3 lock screen in Android | |
devices. It outputs the path in form of a matrix with numbered | |
finger positions. | |
-} | |
import System.Random |
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 Network.Socket as N | |
import Control.Concurrent | |
serverPort :: PortNumber | |
serverPort = 8080 | |
main = do | |
sock <- N.socket N.AF_INET6 N.Stream N.defaultProtocol | |
N.setSocketOption sock N.ReuseAddr 1 | |
N.setSocketOption sock N.ReusePort 1 |
NewerOlder