View gist:e43ec3da8d144cb309d20b5dcd4cb2bf
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
1 | |
2 | |
3 fizz | |
4 | |
5 buzz | |
6 fizz | |
7 | |
8 | |
9 fizz | |
10 buzz |
View install-docker.sh
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/sh | |
apt-get remove -y docker docker-engine docker.io containerd runc | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release |
View api.go
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 ( | |
"crypto/rand" | |
"encoding/binary" | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"strings" |
View PageStreamer.java
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 com.github.chakrit; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.domain.Pageable; | |
import java.util.function.Function; | |
import java.util.stream.Stream; | |
/** |
View Main.elm
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 Browser | |
import Html exposing (div, input, p, span, strong, text) | |
import Html.Attributes exposing (value) | |
import Html.Events exposing (onInput) | |
type alias Model = | |
String |
View gendiff.go
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 gendiff | |
type Op int | |
const ( | |
noOp = Op(iota) | |
Match | |
Delete | |
Insert | |
) |
View Base64.elm
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 Base64 exposing | |
( base64FromBytes | |
, base64ToBytes | |
, fromBase64String | |
, toBase64String | |
) | |
import Bitwise as Bits | |
import Bytes exposing (Bytes) | |
import Bytes.Decode as D |
View elmgroupof.elm
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
groupOf : Int -> List a -> List (List a) | |
groupOf count list = | |
let | |
len = | |
List.length list | |
in | |
if len >= count then | |
List.take count list :: (groupOf count <| List.drop count list) | |
else if len > 0 then |
View main.go
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 ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
const Shift = 254 |
View challenge_py.py
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
import uuid | |
OMISE_FEE = 0.0365 | |
THAILAND_VAT = 0.07 | |
class Transaction: | |
def __init__(self, balance, direction, amount, description): | |
self.balance = balance | |
self.direction = direction | |
self.amount = amount |
NewerOlder