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 DeriveFunctor #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Main where | |
import Prelude hiding (length, filter, succ, foldl, foldr, sum, head, reverse) | |
import qualified Prelude | |
------------------------------------------------------------------------------- | |
newtype Fix f = Fx { unFix :: f (Fix f) } |
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 | |
ps -p 1 -o comm= | |
# see https://www.home-assistant.io/docs/autostart/systemd/ |
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 KindSignatures #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE UnicodeSyntax #-} | |
module Category where | |
class Category (c :: k -> k -> *) where | |
id :: c x x | |
(.) :: c y z -> c x y -> c x z | |
instance Category (->) 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
'atom-workspace': | |
'ctrl-shift-0': 'ide-haskell:toggle-output' |
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 Main | |
import Prelude.Functor | |
total ap : Applicative f => f (a -> b) -> f a -> f b | |
ap = (<*>) | |
total maybeAdd1 : Num a => Maybe a -> Maybe a -> Maybe a | |
maybeAdd1 x y = do x' <- x | |
y' <- y |
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 Main where | |
(.?.) :: Bool -> (a, a) -> a | |
(.?.) True = fst | |
(.?.) False = snd | |
infixl 3 .?. | |
(>:<) :: a -> b -> (a, b) | |
(>:<) = (,) |
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
package org.farmradio.fessbox; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.os.Binder; | |
import android.os.IBinder; | |
import android.support.annotation.Nullable; | |
import android.util.Log; | |
import de.tavendo.autobahn.WebSocketConnection; |
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
package org.farmradio.fessbox; | |
public interface WebSocketMessageListener { | |
void onMessage(String message); | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_weight="1" |
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
const BootstrapPager = React.createClass({ | |
getDefaultProps() { | |
return { | |
currentPage : 0, | |
maxPage : 0, | |
maxButtons : 10 | |
} | |
}, | |
handleSelect(event, selectedEvent) { | |
let page = selectedEvent.eventKey |
NewerOlder