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
newtype MaybeIO a = MaybeIO (IO (Maybe a)) | |
runMaybeIO :: MaybeIO a -> IO (Maybe a) | |
runMaybeIO (MaybeIO x) = x | |
hole = undefined | |
data Hole = Hole | |
instance Monad MaybeIO where | |
return x = MaybeIO (return (Just x)) |
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
-- Clojure -> Haskell port of: https://gist.github.com/nasser/1db446782cf7f3587283 | |
import System.Random (getStdRandom, randomR) | |
pick :: [a] -> IO a | |
pick xs = do | |
n <- getStdRandom $ randomR (0, length xs - 1) | |
return $ xs !! n | |
adjs = ["people's", "brave", "invincible", "unstoppable", "righteous", "just", "honorable", "terrifying", "peaceful"] |
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
#!/usr/bin/env stack | |
{- stack --resolver lts-7.13 --install-ghc runghc -} | |
import Data.Maybe (mapMaybe) | |
import System.Environment (getArgs) | |
song :: Int -> Maybe String | |
song 1 = Just "A Shandy Too Far" | |
song 2 = Just "Adult Contemporary" | |
song 3 = Just "Air Guitar" |
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
''' | |
Maya Python Github project bootstrapping script | |
Makes particular Maya Python Github project releases available in Maya via the | |
user script dir. Pass user, project, and release strings to getGithubRelease, | |
which will download the zip file to the user script dir, and unzip it in there | |
(if it doesn't yet exist). Returns the full path to the unzipped project | |
folder, which can be used to modify sys.path[1], circumventing installation. | |
Note: you still need to ensure all tools deal with one version of the project, |
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
Standardized Ladder of Functional Programming | |
http://lambdaconf.us/downloads/documents/lambdaconf_slfp.pdf | |
Level Key | |
0: I've never heard of this | |
1: I've heard of this | |
2: I've looked into this, but don't get it yet | |
3. I have a basic understanding/am using this | |
4. I've used this for a while/feel pretty solid on | |
5. I could comfortably teach this to others |
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
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self | |
self self self self self self self self self self self self self self self self |
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
1 11684 base | |
2 4409 bytestring | |
3 3980 containers | |
4 3379 text | |
5 3099 mtl | |
6 2565 transformers | |
7 2019 directory | |
8 1791 filepath | |
9 1717 QuickCheck | |
10 1702 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
#!/bin/bash | |
# Make sure the tgz file is in the home directory | |
# Original script downloaded educational version, | |
# whereas I need to use the full, paid-for version | |
# https://forums.autodesk.com/t5/installation-licensing/maya-2018-ubuntu-16-04-lts-start-up-errors/m-p/7446146 | |
FILE=Autodesk_Maya_2017_EN_JP_ZH_Linux_64bit.tgz | |
if [ ! -f ~/$FILE ]; then | |
echo Cannot find ~/$FILE | |
exit |
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
#!/bin/bash | |
# based on: | |
# https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source | |
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox gvim |
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
+++++ + ++++ + +++++++ ++ | |
*+++++ + + ++++++++++++* + +++ +++++ | |
++ + + + +++++*+++ + ++ + +++ | |
+ + + + + + ++ + *++ | |
+ + ++ + ++ +++ + ++ | |
++ ++ * +++ ++ +++ + .+ | |
++ ++ ++ ++ *++ .-- - -- | |
---- -- -- -- -*- --- - -- | |
- --- -- -- -- --* --- - -- | |
-- -- -- -- -- --- *-------- |