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
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Effect.Console (logShow) | |
import TryPureScript (render, withConsole) | |
import Data.Maybe (Maybe(..)) | |
import Data.Tuple (Tuple(..)) |
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 | |
echo 'usage: purescript-package2set.sh <packagename>' | |
set -euo pipefail | |
PACKAGENAME=$1 | |
REPO=`git remote get-url origin` | |
VERSION=`git tag | tail -n 1` | |
echo "\"$1\": {" |
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
-- Loadable | |
-- Thanks to @karls - full implementation would probably be... https://github.com/krisajenkins/purescript-remotedata/blob/v2.1.0/src/Network/RemoteData.purs#L30-L34 | |
-- i stands for identifier, e.g. a schema or a number, or whatever else is needed to load or index it | |
-- kind of a 'maybe'. | |
-- o is for object. Only in the Loaded state is the object available | |
-- example ``` | |
-- showLoaded Loaded id object = show object | |
-- showLoaded _ = "Object not loaded" | |
-- ``` |
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
Fri Mar 24 12:38:56 UTC 2017 |
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
module Client where | |
import Prelude (bind, return) | |
import Pux (App, Config, CoreEffects, start, renderToDOM) | |
import Control.Bind ((=<<)) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE) | |
import DOM (DOM) |
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
module Main where | |
import Prelude (($), bind,id, pure) | |
import Control.Monad.Eff.Exception (Error, EXCEPTION, catchException, message) | |
import Control.Monad.Aff (Aff, attempt) | |
import Control.Monad.Aff.Unsafe (unsafeInterleaveAff) | |
import Data.Either (either) | |
catchException' :: forall e a. (Error -> a) -> Aff (err :: EXCEPTION | e ) a -> Aff e a | |
catchException' handler f = do |
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
{- Based on https://github.com/ryantrinkle/try-reflex/README.md . | |
This is the try Reflex calculator example modified | |
to collect the two numbers and an operator into a Maybe Calculation. | |
So we use the validation for each field to validate the form as a hole. | |
This could be useful to build forms for e.g. an admin interface. -} | |
{-# LANGUAGE RecursiveDo #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE GADTs #-} |
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
ENEMY_SPAWN_EASY = 0 | |
ENEMY_SPAWN_HARD = 1 | |
EnemyHorde = class() | |
function EnemyHorde:init() | |
-- you can accept and set parameters here | |
self.frame = 0 | |
self.units = {} -- enemy units | |
self.heroBullets = {} -- hero's bullets |
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
hero = nil | |
enemies = nil | |
bgLines = nil | |
explosion = nil | |
killCount=0 | |
GAME_PLAYING = 0 | |
GAME_DEAD = 1 | |
GAME_WON = 2 |
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
#varnish cache server configuration file, used with drupal 6 and apache | |
#inspiration from https://wiki.fourkitchens.com/display/PF/Configure+Varnish+for+Pressflow | |
#with change from obj to beresp of | |
#http://www.mail-archive.com/[email protected]/msg02911.html | |
#and cache HIT or MISS header from somewhere else | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "80"; | |
.connect_timeout = 600s; | |
.first_byte_timeout = 600s; |