CSS and SVG recreation of the new Google material design loading spinner.
Forked from Fran Pérez's Pen Material Design Spinner.
A Pen by Casper Pascal on CodePen.
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
# | |
# If you want to see svn modifications: | |
# export SVN_SHOWDIRTYSTATE=1 | |
# | |
# Put this in your PS1 like this: | |
# PS1='\u@\h:\W\[\033[01;33m\]$(__git_svn_ps1)\[\033[00m\]$ ' | |
# Git/Subversion prompt function | |
__git_svn_ps1() { |
server { | |
listen 80; | |
server_name localhost; | |
# ... other default site stuff, document root, etc. ... | |
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ { | |
alias /home/$userdir_user/public_html$userdir_uri; | |
index index.html index.htm index.php; | |
autoindex on; |
typedef void* function_t; | |
typedef void* prev_closure_t; | |
union arg_t { | |
void* box; // Pointer to a boxed thing (or closure) | |
int val; // Byval if it fits in 8 bytes | |
}; | |
// foo a b c d e = ... |
-- in reply to http://www.reddit.com/r/haskell/comments/21mja6/make_lllegal_state_transitions_unrepresentable/ | |
-- | |
-- We implement a tiny language with three commands: Open, Close, and Get. | |
-- The first Get after an Open returns 1, the second Get returns 2, and so on. | |
-- | |
-- Get is only valid while the state is open, and | |
-- Open must always be matched by a Close. | |
-- We enforce both restrictions via the type system. | |
-- | |
-- There are two valid states: Opened and Closed. |
-- in reply to http://www.reddit.com/r/haskell/comments/21mja6/make_lllegal_state_transitions_unrepresentable/ | |
-- | |
-- We implement a tiny language with three commands: Open, Close, and Get. | |
-- The first Get after an Open returns 1, the second Get returns 2, and so on. | |
-- | |
-- Get is only valid while the state is open, and | |
-- Open must always be matched by a Close. | |
-- We enforce both restrictions via the type system. | |
-- | |
-- There are two valid states: Opened and Closed. |
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes #-} | |
import Data.Aeson | |
import Data.Monoid | |
import Data.Text (Text, unpack) | |
import Control.Monad.Writer | |
import qualified Data.Map as M | |
import qualified Data.Vector as V | |
import qualified Data.HashMap.Strict as H | |
import Language.Haskell.TH |
{-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase #-} | |
import Conduit | |
import Data.Conduit | |
import Data.Conduit.Network | |
import qualified Data.ByteString.Char8 as BS | |
import Data.Conduit.TMChan | |
import Text.Printf (printf) | |
import Control.Concurrent.STM | |
import qualified Data.Map as Map |
CSS and SVG recreation of the new Google material design loading spinner.
Forked from Fran Pérez's Pen Material Design Spinner.
A Pen by Casper Pascal on CodePen.
{-# LANGUAGE GADTs #-} | |
module Yolo where | |
import System.IO.Unsafe | |
class Yolo f where | |
yolo :: f a -> a | |
instance Yolo Maybe where | |
yolo (Just x) = x |