Skip to content

Instantly share code, notes, and snippets.

import vibe.vibe;
class SimpleService {
@path("/sendSms") void SendSms(string phone, string text) {
logInfo("Sending sms to [%s] with text [%s]", phone, text);
requestHTTP("http://api.prostor-sms.ru/messages/v2/send.json",
(scope req) {
req.method = HTTPMethod.POST;
req.writeJsonBody([
"name": "My Name",
@yonax
yonax / file1.txt
Created May 12, 2017 12:50
the description for this gist
String file contents
import Graphics.Element exposing (show)
import List exposing (map, map2, length, repeat, concat, sum, foldl, filterMap, isEmpty, member, head, tail, indexedMap, filter)
import Maybe exposing (andThen)
import Color
import Graphics.Element exposing (..)
--main = show <| constrainLine [1, 1] [Nothing, Just False, Nothing, Nothing]
--main = show <| tile [1, 1] [Nothing, Just False, Nothing, Nothing]
main = showGrid <| Maybe.withDefault grid0 <| constrainGrid rows cols grid0 `andThen`
constrainGrid rows cols `andThen`
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Random
import Color exposing (Color)
import Time exposing (fps)
type alias Vector = (Float, Float)
type alias Circle =
{ center : Vector