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 gleam/int | |
import gleam/io | |
import gleam/list | |
import gleam/set | |
import gleam/string | |
pub fn part_one(wire_one: List(String), wire_two: List(String)) { | |
let central = #(0, 0) | |
let assert Ok(wire_one_path) = list.rest(draw(wire_one, [central])) | |
let assert Ok(wire_two_path) = list.rest(draw(wire_two, [central])) |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"net" | |
"net/http" | |
"time" | |
) |
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
// given mime types like this | |
// | |
// val input = List( | |
// List("txt", "plain/text"), | |
// List("jpg,jpeg", "image/jpeg"), | |
// List("tif,tiff", "application/tiff") | |
// ) | |
val parseMimeMap: List[List[String]] => Map[String, String] = { input => | |
input | |
.flatMap( entry => { |
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
# in my case i was trying to ignore generated build dirs like target and node modules | |
$ > zip -r documents.zip Documents/ -x "Documents/**/target/*" -x "Documents/**/node_modules/*" -x "Documents/**/.idea/*" |