Skip to content

Instantly share code, notes, and snippets.

🛁
Sometimes I sit and wonder, sometimes I just sit

Sergey Samokhov hoichi

🛁
Sometimes I sit and wonder, sometimes I just sit
Block or report user

Report or block hoichi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hoichi
hoichi / poorman_flexbox.css
Created Sep 24, 2015
A poor man's flexbox
View poorman_flexbox.css
/* © http://codepen.io/chriscoyier/pen/nfyGk */
#container {
text-align: justify;
font-size: 0.1px; /* IE 9 & 10 don't like font-size: 0; */
min-width: 600px;
}
#container div {
width: 150px;
height: 125px;
@hoichi
hoichi / Main.elm
Last active Apr 1, 2017
Nested subscriptions?
View Main.elm
module Main exposing (..)
import Config exposing (..)
import Storage exposing (..)
--
import Html exposing (..)
@hoichi
hoichi / Benchmark.ml
Created Sep 7, 2018
Benchmarking in OCaml
View Benchmark.ml
#require "core_bench";;
open Core_bench;;
[ Bench.Test.create ~let numbers = List.range 0 1000 in
[ Bench.Test.create ~name:"sum_if" (fun () -> ignore (sum_if numbers))
; Bench.Test.create ~name:"sum" (fun () -> ignore (sum numbers)) ]
|> Bench.bench
;;
(* from https://dev.realworldocaml.org/lists-and-patterns.html#performance *)
@hoichi
hoichi / Options.re
Created Nov 8, 2018
Experiments with optional parameters in ReasonML
View Options.re
/**
* Trying to figure out types of the optional arguments.
*/
let mandatory = (~s: string) => s;
// let mandatory: (~s: string) => string = <fun>;
let optional = (~s: string=?) => s;
View counties.json
[
{"label": "Afghanistan", "value": "af"},
{"label": "Åland Islands", "value": "ax"},
{"label": "Albania", "value": "al"},
{"label": "Algeria", "value": "dz"},
{"label": "American Samoa", "value": "as"},
{"label": "AndorrA", "value": "ad"},
{"label": "Angola", "value": "ao"},
{"label": "Anguilla", "value": "ai"},
{"label": "Antarctica", "value": "aq"},
You can’t perform that action at this time.