Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| FROM debian:stretch-slim | |
| # `curl` and `netbase` are needed to connect to the external network | |
| RUN apt-get update -qq \ | |
| && apt-get install -y libpq5 curl netbase |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| ## 洋食 | |
| - パスタ | |
| - ナポリタン | |
| - アンチョビトマト | |
| - 味噌 | |
| - ボンゴレビアンコ | |
| - フリッツ | |
| ## 中華 | |
| - チャーハン |
| FROM bradrydzewski/base | |
| WORKDIR /home/ubuntu | |
| USER ubuntu | |
| MAINTAINER nakaji-dayo <[email protected]> | |
| RUN cd / && \ | |
| sudo wget https://www.haskell.org/platform/download/2014.2.0.0/haskell-platform-2014.2.0.0-unknown-linux-x86_64.tar.gz && \ | |
| sudo tar -xzvf haskell-platform-2014.2.0.0-unknown-linux-x86_64.tar.gz && \ |
| [Unit] | |
| Description=Keter | |
| After=local-fs.target network.target SuSEfirewall2.service | |
| [Service] | |
| ExecStart=/usr/bin/keter /etc/keter.yaml | |
| [Install] | |
| WantedBy=multi-user.target |
| portS <- getEnv "PORT" | |
| let port = read portS | |
| runResourceT $ flip runSqlPool pool $ do | |
| runMigration migrateAll | |
| s <- static "static" | |
| warp port $ App s pool |
| root: /opt/keter | |
| listeners: | |
| # HTTP | |
| - host: "*4" # Listen on all IPv4 hosts | |
| #port: 80 # Could be used to modify port | |
| func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { | |
| return UITableViewAutomaticDimension | |
| } |
| rr = case decode "[{\"key\":\"yahoo\", \"count\": 5},{\"key\":\"google\"}]" of | |
| Nothing -> fail "decode error" | |
| Just v -> (parse parser v) :: Result String | |
| where parser = parseJSON >=> withArray "array" (.!! 0) >=> withObject "object" (.: "key") | |
| (.!!) :: (FromJSON a) => Array -> Int -> Parser a | |
| arr .!! i | |
| | V.length arr >= i = parseJSON $ arr V.! i | |
| | otherwise = fail "hogeeee" |