Skip to content

Instantly share code, notes, and snippets.

fishyFrogFace / Main.hs
Last active Apr 14, 2019
Read from file
View Main.hs
import System.Environment (getArgs)
doStuffToFile :: String -> IO ()
doStuffToFile str = print $ length str
-- alt1: "stack build" så "stack exec <projectname>-exe path-to-file-if-not-in-folder/bible.txt"
main :: IO ()
main = do
args <- getArgs
case args of
fishyFrogFace / parseEncoding.hs
Created Apr 13, 2019
Example of reading and writing to files with custom encoding
View parseEncoding.hs
import System.IO
import Control.Applicative (liftA)
import Data.Foldable (for_)
import Control.DeepSeq (($!!))
writeFileWithEncoding :: FilePath -> String -> IO ()
writeFileWithEncoding fp content =
withFile fp WriteMode $ \h ->
hSetEncoding h utf8 >>
hPutStr h content
fishyFrogFace /
Created Oct 20, 2018 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


fishyFrogFace /
Created Oct 1, 2016 — forked from james-d/
Simple demo of creating a appointment-calendar like view (similar to the default calendar view in Google Calendar), in JavaFX 8. Just manages selection of time slots in the grid.
package calendarview;
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
You can’t perform that action at this time.