Skip to content

Instantly share code, notes, and snippets.

@zhukeepa
zhukeepa / Airtable -> Workflowy
Created November 19, 2016 11:07
Airtable -> Workflowy task
Given [this Airtable](https://airtable.com?inviteId=invsaZhDj2hUhQ30l&inviteToken=c1877518ea0af8556f46a31788a9da2d) (preview images: https://puu.sh/snkhh/a786cd9b1a.png, https://puu.sh/snkhI/02ae757c97.png)
write me a script that generates this OPML code:
<?xml version="1.0"?>
<opml version="2.0">
<head>
<ownerEmail>zhukeepa@gmail.com</ownerEmail>
</head>
<body>
module Regex.Parse (regexFromString) where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Combinator
import Data.List
import Regex.Types
parseRegex :: Parser Rx
parseRegex = choice [ try parsePipes, try parseConcat, try parseStar, try parseParens, try parseAlphaNum ]
class Node
attr_accessor :name, :children
def initialize(name = nil, children = [])
@name, @children = name, children
end
end
def dfs(node, name)
return node if node.name == name
def opposite(symbol)
symbol == 'x' ? 'o' : 'x'
end
class Board
# The tic tac toe board is stored as an array of 9 chars, where each char is either o, x, or _.
def initialize(board = ['_']*9)
@board = board
end