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
def test | |
puts "test" | |
end |
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
class Player | |
DIRECTIONS = [:forward, :right, :backward, :left] | |
def play_turn(warrior) | |
@warrior = warrior | |
if feel_enemy? then | |
warrior.attack! enemy | |
elsif injured? then | |
warrior.rest! | |
else | |
warrior.walk! empty |
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
data DiceState = Up | Down deriving (Show,Eq) | |
type DiceStates = [DiceState] | |
data Result = Win | Lose | Even deriving (Show,Eq) | |
type Submission = (DiceState,DiceState,DiceState) | |
count :: Eq a => a -> [a] -> Int | |
count x = length . filter (==x) | |
matchAt :: DiceStates -> Submission -> Maybe Int | |
matchAt diceStates submission = matchAt' diceStates submission 3 |
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
package main | |
import ( | |
"github.com/nareix/joy4/av/avutil" | |
"github.com/nareix/joy4/av/pubsub" | |
"github.com/nareix/joy4/format" | |
"github.com/nareix/joy4/format/rtmp" | |
) | |
var queue *pubsub.Queue |
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
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-ip=127.0.0.1 --write-kubeconfig-mode 644" sh - |