Skip to content

Instantly share code, notes, and snippets.

View fellz's full-sized avatar

Roman fellz

View GitHub Profile
type TTHProject = {
id: string, // uuid проекта
name: string, // название проекта
shipClass: string, // список классов кораблей
shipType: "Надводный" | "Подводный", // тип, надводный - подводный
// Размеры
length: number, // Любой - длина
width: number, // Любой - ширина
draught: number, // Надводный - осадка, Подводный - отсутствует
// Водоизмещение
open Suave
open Suave.Filters
open Suave.Operators
open Suave.Successful
let app =
choose
[ GET >=> choose
[ path "/hello" >=> OK "Hello GET"
path "/goodbye" >=> OK "Good bye GET" ]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My Angular2 App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- inject:css -->
<link rel="stylesheet" href="/node_modules/materialize-css/dist/css/materialize.min.css">
@fellz
fellz / html
Created January 26, 2016 16:14
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My Angular2 App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- inject:css -->
<link rel="stylesheet" href="/node_modules/materialize-css/dist/css/materialize.min.css">
import Html exposing (div, text)
import Html.Attributes exposing (..)
myStyle : Attribute
myStyle =
style
[
("width","100px"),
("height","100px"),
("margin-left","20px"),
func main() {
var bind = flag.String("bind", ":1235", "Address to bind")
flag.Parse()
fs := http.FileServer(http.Dir("static"))
http.Handle("/", fs)
log.Println("Starting HTTP server on ", *bind)
log.Fatal(http.ListenAndServe(*bind, nil))
}
[:ul#todo-list
(for [todo (filter (case @filt
:active (complement :done)
:done :done
:all identity) items)]
^{:key (:id todo)} [todo-item todo])]]
(ns omlet.middleware
(:require [omlet.session :as session]
[omlet.layout :refer [*servlet-context*]]
[taoensso.timbre :as timbre]
[environ.core :refer [env]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]
[ring.util.response :refer [redirect]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.session-timeout :refer [wrap-idle-session-timeout]]
@fellz
fellz / designer.html
Created March 11, 2015 13:35
designer
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@fellz
fellz / gist:dc008cd40016bdaa1659
Created February 23, 2015 11:08
Git recipes - remove files after gitignore
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
Note the "." at the end of the lines here. The first command removes everything from the index, then the second command adds everything back again, but this time it reads .gitignore before doing so, so this magically removes everything in .gitignore for you.