Skip to content

Instantly share code, notes, and snippets.

View vovanmix's full-sized avatar

Vladimir Mikhaylovskiy vovanmix

  • San Francisco Bay Area
View GitHub Profile
@vovanmix
vovanmix / Dockerfile
Last active October 2, 2017 06:26
Docker-compose config volumes
FROM busybox
COPY nginx.conf /etc/nginx/nginx.conf
COPY mime.types /etc/nginx/mime.types
COPY awslogs.conf /etc/awslogs/awslogs.conf
@vovanmix
vovanmix / google app engine docker.md
Last active July 4, 2017 06:40
google app engine docker.md
@vovanmix
vovanmix / react-forms.jsx
Last active March 24, 2017 05:36
react-forms
///##################
/// Create Form Component
class CreateTask extends React.Component {
handleSuccess: function() {
this.context.router.push('/trips');
},
handleSubmit: function(data) {
const _this = this;
Random.generate OnResult (Random.int 1 6)

Call the given generator to produce a value of type Int, then use the msg constructor "OnResult" on the generated Int to produce a message and finally pass that message to my update function to get the next state of the program and your next command.

@vovanmix
vovanmix / benchmark.sh
Last active March 1, 2017 08:02
Simple curl benchmark
#!/bin/bash
URL="$1"
MAX_RUNS="$2"
SUM_TIME="0"
SUM_SIZE="0"
i="0"
while [ $i -lt $MAX_RUNS ]; do
TIME=`curl $URL -o /dev/null -s -w %{time_total}`
@vovanmix
vovanmix / scala json parser.scala
Created February 17, 2017 03:52
scala json parser
import io.circe._, io.circe.parser._
import cats._
import cats.data.Xor
val raw = """
{
"key" : "value",
"lorem" : "ipsum"
}
"""
@vovanmix
vovanmix / Scala ORM comparison.scala
Created February 14, 2017 10:12
Scala ORM comparison
/// Slick
// schema
case class Album(
artist : String,
title : String,
id : Long = 0L)
class AlbumTable(tag: Tag) extends Table[Album](tag, "albums") {
def artist = column[String]("artist")
@vovanmix
vovanmix / Editor keybindings.md
Last active February 10, 2017 04:19
Editor keybindings

add selection (clone caret) above/below

ctrl-shift-down

advanced open file / jump to navigarion bar

cmd + '

@vovanmix
vovanmix / Maps.md
Last active May 19, 2017 01:15
Languages cheatcheet

Go

//  To test for a key without retrieving the value, use an underscore in place of the first value: 
_, ok := m["route"]
@vovanmix
vovanmix / registration-pages.svg
Created September 9, 2016 16:10
registration-pages.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.