This file contains hidden or 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 FlexibleContexts #-} | |
import Control.Monad (replicateM_) | |
import Data.Map (fromList, (!)) | |
import Data.Monoid (All, (<>)) | |
import GHC.IO.Handle.Types (Handle) | |
import Network.HostName (getHostName) | |
import XMonad hiding ((|||)) | |
import XMonad.Actions.CopyWindow (copy, kill1) | |
import XMonad.Actions.CycleWS (Direction1D (..), |
This file contains hidden or 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
module Main where | |
import Data.Monoid(Sum(..), getSum) | |
import Data.Char(digitToInt) | |
import System.Environment(getArgs) | |
main :: IO () | |
main = do | |
(arg:_) <- getArgs | |
let list = (Sum . digitToInt) <$> arg |
This file contains hidden or 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
var express = require('express'); | |
var path = require('path'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var session = require('express-session'); | |
var app = express(); | |
// Use the session middleware | |
app.use(session({ |