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
// APOD.swift | |
// Test with ReactiveCocoa 4 | |
// | |
// Created by Chris Patrick Schreiner on 17-11-2015. | |
import ReactiveCocoa | |
import Result | |
import XCPlayground | |
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true |
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 exposing (..) | |
import Html exposing (..) | |
import Html.App as App | |
import Html.Events exposing (onClick) | |
import Req exposing (..) | |
import Dict exposing (Dict) | |
main : Program Never |
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
parseKeyPress : Int -> Model -> ( Model, Cmd Msg ) | |
parseKeyPress c model = | |
let | |
f = | |
case parseKey c of | |
Key1 -> | |
DebugTogglePadding | |
KeySpace -> | |
MakeMagicHappen |
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
elm-stuff |
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
var path = require('path'); | |
var webpack = require('webpack'); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
resolveLoader: { | |
root: __dirname + "/node_modules" | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ |
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 Maybe exposing (Maybe, withDefault) | |
import List exposing (head, length) | |
import Graphics.Collage as GC | |
import Graphics.Element as GE | |
import Graphics.Element | |
import Graphics.Collage exposing (rotate) | |
import Signal exposing (..) | |
import Mouse |
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
port runner : Task Http.RawError () | |
port runner = State.askForData q `Task.andThen` report | |
report : Http.Response -> Task x () | |
report res = | |
Signal.send contentMailbox.address (toString res.value) | |
contentMailbox : Signal.Mailbox String |
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 Lifting (main) where | |
import Json.Decode as J | |
import Window | |
import Html | |
import Http | |
import Task | |
import Graphics.Element | |
import Color exposing (grayscale) | |
import Signal exposing(map) |
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
/// | |
- (ConfigureCellBlock)dimmedCell { | |
return [[^(UITableViewCell *cell) { | |
cell.backgroundColor = [self colorFor:@"sub.cell.background"]; | |
cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
} copy] autorelease]; | |
} | |
/// | |
- (ConfigureBadgeBlock)standardBadge { |
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
// log every category | |
[[L4Logger rootLogger] setLevel:[L4Level all]]; | |
// send log messages to console | |
L4ConsoleAppender *consoleAppender=[[[L4ConsoleAppender alloc] initTarget:YES withLayout: [L4Layout simpleLayout]] autorelease]; | |
[[L4Logger rootLogger] addAppender: consoleAppender]; | |
L4Logger *theLogger = [L4Logger loggerForClass:[L4FunctionLogger class]]; | |
[theLogger setLevel:[L4Level debug]]; | |
// | |
log4Info(@"The logging system has been initialized."); |
NewerOlder