I hereby claim:
- I am furu on github.
- I am tfrkd (https://keybase.io/tfrkd) on keybase.
- I have a public key ASDNZNG2QCki95C0WK-izxpJabYQQFiBxXvCFPv27VfbDgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| {-# LANGUAGE OverloadedStrings #-} | |
| import Network.HTTP.Simple | |
| main :: IO () | |
| main = do | |
| resp <- httpLBS "HEAD https://httpbin.org/get" | |
| putStrLn $ "Status: " ++ show (getResponseStatus resp) | |
| putStrLn $ "Headers: " ++ show (getResponseHeaders resp) |
| {-# LANGUAGE OverloadedStrings #-} | |
| import qualified Data.ByteString.Lazy.Char8 as L8 | |
| import Network.HTTP.Simple | |
| main :: IO () | |
| main = do | |
| resp <- httpLBS "https://httpbin.org/get?query=hello world" | |
| L8.putStrLn $ getResponseBody resp |
| {-# LANGUAGE OverloadedStrings #-} | |
| import qualified Data.ByteString.Lazy.Char8 as L8 | |
| import Network.HTTP.Simple | |
| main :: IO () | |
| main = do | |
| resp <- httpLBS "https://httpbin.org/get" | |
| putStrLn $ "Status: " ++ show (getResponseStatus resp) | |
| putStrLn $ "Headers: " ++ show (getResponseHeaders resp) |
| main = undefined | |
| -- | ๅๅใ่ฒทใใใ่ชฟในใ้ขๆฐ | |
| -- | |
| -- ใๆๆ้ (money)ใใจใๅๅใฎๅคๆฎต (price)ใใๆธกใใจใ | |
| -- ่ณผๅ ฅๅฏ่ฝใชใ Trueใ่ณผๅ ฅไธๅฏ่ฝใชใ False ใ่ฟใใ | |
| -- | |
| -- >>> canBuy 100 300 | |
| -- False | |
| -- |
| import Control.Spoon (spoon) | |
| import Control.DeepSeq (NFData) | |
| predMay :: (Enum a, NFData a) => a -> Maybe a | |
| predMay = spoon . pred | |
| pred3 :: (Enum a, NFData a) => a -> Maybe a | |
| pred3 x = return x >>= predMay >>= predMay >>= predMay | |
| predN :: (Enum a, NFData a) => Int -> a -> Maybe a |
| import System.Random | |
| main :: IO () | |
| main = do | |
| gen <- getStdGen | |
| putStrLn $ message $ dice1d100 gen | |
| dice1d100 :: StdGen -> Int | |
| dice1d100 gen = fst $ randomR (1, 100) gen |
| import System.Random | |
| main :: IO () | |
| main = do | |
| gen <- getStdGen | |
| let (n, _) = randomR (1, 100) gen :: (Int, StdGen) | |
| putStrLn $ "ใตใคใณใญใฎ็ตๆใฏ" ++ show n ++ "ใงใ๏ผ" |
| #!/bin/sh | |
| # chkconfig: 345 60 40 | |
| # description: unicorn application server | |
| # processname: unicorn | |
| USER="ec2-user" | |
| APP_ENV="production" | |
| APP_ROOT="/home/ec2-user/www/foo/current" | |
| UNICORN_CONF_FILE="$APP_ROOT/config/unicorn.rb" |