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
| trait AgentLogging extends Logging { self: App => | |
| def adaptHandler(h: SLF4JBridgeHandler): Handler = { | |
| return new Handler(formatter = BareFormatter, level = None) { | |
| override def flush() = h.flush() | |
| override def publish(record: LogRecord) = h.publish(record) | |
| override def close() = h.close() | |
| } |
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
| import React from 'react'; | |
| import AppBar from 'material-ui/lib/app-bar'; | |
| import RaisedButton from 'material-ui/lib/raised-button'; | |
| import getMuiTheme from 'material-ui/lib/styles/getMuiTheme'; | |
| import MyTheme from '../theme'; | |
| import LeftNav from 'material-ui/lib/left-nav'; | |
| import Divider from 'material-ui/lib/divider'; | |
| import IconButton from 'material-ui/lib/icon-button'; |
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
| def lex(line): | |
| """ | |
| Consumes a line and yields tokens for numbers and relevant | |
| symbols and words. | |
| """ | |
| for s in re.split('[^a-zA-Z0-9_%$/.]+', line): | |
| # Skip empty strings. We don't need them. | |
| if not s: | |
| continue |
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
| #!/bin/bash | |
| function atoi { | |
| IP=$1; IPNUM=0 | |
| for (( i=0 ; i<4 ; ++i )); do | |
| ((IPNUM+=${IP%%.*}*$((256**$((3-${i})))))) | |
| IP=${IP#*.} | |
| done | |
| echo $IPNUM | |
| } |
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 Arrows #-} | |
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE StandaloneDeriving #-} |
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 Arrows #-} | |
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE StandaloneDeriving #-} |
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 Arrows #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| module Haven.Types 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
| data TicketId' a = TicketId a deriving (Functor) | |
| type TicketId = TicketId' Int | |
| type TicketIdColumn = TicketId' (Column PGInt4) | |
| $(makeAdaptorAndInstance "pTicketId" ''TicketId') | |
| data Ticket' a b c d e = Ticket { _tId :: a | |
| , _tTicket :: b | |
| , _tUserId :: c | |
| , _tExpires :: d | |
| , _tConsumed :: e } |
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
| noflo = require 'noflo' | |
| browserify = require 'browserify' | |
| evil = require 'notevil' | |
| class Bundler extends noflo.Component | |
| icon: 'gift' | |
| description: 'Bundles input files using Browserify' | |
| constructor: -> | |
| @inPorts = new noflo.InPorts | |
| bundle: |