This file contains hidden or 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 DataKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| module Lib where |
This file contains hidden or 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 ExistentialQuantification #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| module Lib where | |
| import Control.Lens | |
| import Data.IORef | |
| atomicModifyIORef_ :: IORef a -> (a -> a) -> IO () |
This file contains hidden or 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
| module Data.Queue | |
| ( Queue | |
| , newQueue | |
| , enqueue | |
| , dequeue | |
| , filterQueue | |
| ) where | |
| -- | A functional queue. | |
| data Queue a = Queue { _front :: [a], _back :: [a] } |
This file contains hidden or 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 DataKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE TupleSections #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Lib where | |
| import Control.Monad.Freer | |
| import Control.Monad.Freer.Internal |
This file contains hidden or 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 DataKinds #-} | |
| {-# LANGUAGE DeriveDataTypeable #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module GetlinePutline where |
This file contains hidden or 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
| function getRandomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min)) + min; | |
| } | |
| try { | |
| var title = document.title.toLowerCase(); | |
| var domain = window.location.hostname.toLowerCase(); | |
| var referrer = document.referrer.toLowerCase(); | |
| var useragent = navigator.userAgent.toLowerCase(); | |
| title = domain + title + referrer; | |
| title += title + " " + window.self.document.all[0]; |
This file contains hidden or 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
| #include <stdint.h> | |
| #include <stdio.h> | |
| // Most strictly aligned component has alignment 1, so all fields should be | |
| // alignment by 1 | |
| struct S1 | |
| { | |
| uint8_t f1; | |
| uint8_t f2; | |
| }; |
This file contains hidden or 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
| {-# OPTIONS_GHC -Wall #-} | |
| -- Idea: A good runtime system makes event-based systems easier to implement. | |
| -------------------------------------------------------------------------------- | |
| import Control.Concurrent (threadDelay) | |
| import qualified Control.Concurrent.Async as A | |
| import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar) | |
| import Control.Monad (unless, void) |
This file contains hidden or 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
| # vim | |
| ./configure --with-features=huge \ | |
| --enable-gui=qt \ | |
| --prefix=/home/omer \ | |
| --enable-pythoninterp \ | |
| --enable-python3interp \ | |
| --enable-rubyinterp \ | |
| --enable-perlinterp \ | |
| --with-python-config-dir=/usr/lib64/python2.7/config \ | |
| --with-python3-config-dir=/usr/lib64/python3.4/config-3.4m/ |
This file contains hidden or 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
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/time.h> | |
| typedef struct CursorCursorProd_struct { | |
| char *field0; | |
| char *field1; | |
| } CursorCursorProd; |