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
# Use GMSH from within FreeCAD | |
# useful for performing any | |
# kind of scripting with the | |
# FEM module | |
# Require : FreeCAD > 0.17 | |
# : GMSH | |
# Required imports | |
import FreeCAD |
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
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms) | |
defaults write -g KeyRepeat -int 1 # normal minimum is 2 ( 30 ms) |
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
set nocompatible | |
inoremap jk <esc> | |
set scrolloff=999 | |
set autochdir | |
set path+=** | |
set number | |
set expandtab | |
set wildmenu | |
filetype indent on | |
syntax enable |
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
set nocompatible | |
inoremap jk <esc> | |
set scrolloff=999 | |
set wildmenu | |
set path+=** | |
set number | |
set expandtab | |
set autoindent | |
filetype plugin indent on | |
syntax enable |
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
{-# LANGUAGE InstanceSigs #-} | |
-- Rose Trees | |
data Tree a = | |
a :> [Tree a] | |
deriving (Eq, Show) | |
singleton :: a -> Tree a | |
singleton = (:> []) |
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
{-# LANGUAGE OverloadedStrings #-} | |
import Graphics.Svg | |
svg :: Element -> Element | |
svg content = doctype | |
<> with (svg11_ content) [Version_ <<- "1.1", Width_ <<- "300", Height_ <<- "200"] | |
contents :: Element | |
contents = |
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
{-# LANGUAGE OverloadedStrings #-} | |
-- Translated from https://upload.wikimedia.org/wikipedia/commons/b/b7/Vamos_matroid.svg | |
-- For an absolutely amazing collection of Mathematical illustrations take a | |
-- look at https://commons.wikimedia.org/wiki/User:David_Eppstein/Gallery | |
import Graphics.Svg | |
svg :: Element -> Element | |
svg content = |
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
:set prompt "\ESC[1;34m%s\n\ESC[0;34mλ: \ESC[m" | |
:def hoogle \s -> return $ ":!hoogle --count=15 \"" ++ s ++ "\"" | |
:def doc \s -> return $ ":!haskell-docs " ++ s | |
:set -XOverloadedStrings | |
:set -XFlexibleContexts |
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
alias ghci-core="ghci -ddump-simpl -dsuppress-idinfo \ | |
-dsuppress-coercions -dsuppress-type-applications \ | |
-dsuppress-uniques -dsuppress-module-prefixes" |
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
{-# LANGUAGE InstanceSigs #-} | |
-- http://blog.tmorris.net/posts/20-intermediate-haskell-exercises/ | |
-- Functor | |
class Fluffy f where | |
furry :: (a -> b) -> f a -> f b | |
instance Fluffy [] where | |
furry :: (a -> b) -> [a] -> [b] |
OlderNewer