Skip to content

Instantly share code, notes, and snippets.

🚀
-

Nikita Kovalev maizy

🚀
-
Block or report user

Report or block maizy

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
@maizy
maizy / minetest-5.0.md
Created Apr 6, 2019
minetest 5.0 on macOS
View minetest-5.0.md

minetest 5.0 on macOS

Based on homebrew formula

Build

Build dependencies:

brew install freetype gettext irrlicht jpeg libogg libvorbis luajit cmake
View steam_with_skips.scala
import scala.annotation.tailrec
@tailrec
def nextStep(
iter: Iterator[Int], someAcc: List[Int]): (Stream[Int], Iterator[Int], List[Int]) = {
if (iter.hasNext) {
val i = iter.next()
// emulate some window function computation
val newAcc = (i / 2) :: someAcc
val windowValue = newAcc.sum
View gist:4d7d1536a03a4a7d7b99901e2ba1d860
[info] +-com.typesafe.play:play-ahc-ws-standalone_2.11:1.0.0-M4 [S]
[info] | +-com.typesafe.play:cachecontrol_2.11:1.1.2 [S]
[info] | | +-joda-time:joda-time:2.7 (evicted by: 2.9.6)
[info] | | +-joda-time:joda-time:2.9.6
[info] | | +-org.joda:joda-convert:1.7
[info] | | +-org.scala-lang.modules:scala-parser-combinators_2.11:1.0.5 [S]
[info] | | +-org.slf4j:slf4j-api:1.7.22
[info] | |
[info] | +-com.typesafe.play:play-ws-standalone_2.11:1.0.0-M4 [S]
[info] | | +-com.typesafe.akka:akka-stream_2.11:2.4.14 [S]
@maizy
maizy / README.md
Last active Dec 10, 2015
python cli encoding
View README.md
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
@maizy
maizy / letter.txt
Last active Oct 27, 2015
письмо счастья (выужено из спама)
View letter.txt
Dr. Harry Thomas <acct.contfarmkalimantan@___.com>
Д-р Томас Гарри Brondesbury, Северо-Запад Лондон, Англия
Дорогой друг.
Я доктор Гарри Томас из Brondesbury, Северо-Запад Лондон, здесь, в Англии. Я
работаю на UBS Investment Bank London. Я пишу вам о бизнес-предложение,
которое будет из огромную пользу для нас обоих. В моем отделе, в качестве
View SupervisortClusterEventsSpec.scala
// file: src/multi-jvm/scala/SupervisortClusterEventsSpec.scala
//
// Required properly multi-jvm setup:
// http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html#How_to_Test
//
// based on example from akka docs
import scala.collection.mutable
import scala.concurrent.duration._
import org.scalatest.{ Suite, BeforeAndAfterAll, FlatSpecLike, Matchers }
@maizy
maizy / node.md
Created Aug 12, 2015
install node v0.10.36 with brew in os x
View node.md
cd /usr/local/Library/Formula
brew remove node --force
git checkout b64d9b9c431642a7dd8d85c8de5a530f2c79d924
brew install node
git checkout master

based on https://gist.github.com/mpesic/3759330

@maizy
maizy / repl.txt
Created Jun 1, 2015
Anonymous func from method with implicit params?
View repl.txt
$ scala
Welcome to Scala version 2.11.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67).
Type in expressions to have them evaluated.
Type :help for more information.
scala> class MyContext2(val m: Int)
defined class MyContext2
scala> object TestObj2{ def withImp(s: String)(implicit c: MyContext2): String = s"c:${c.m}" }
defined object TestObj2
@maizy
maizy / repl.md
Last active Aug 29, 2015
Как же передаются implicit параметры, почему не также как при карировании?
View repl.md

Как же передаются implicit параметры, почему не также как при карировании?

$ scala
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_31).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scala.reflect.runtime.{universe => u}
import scala.reflect.runtime.{universe=>u}
@maizy
maizy / app.py
Created Apr 2, 2015
curl async client problems
View app.py
# coding=utf-8
import httplib
import importlib
import logging
import re
import time
from lxml import etree
import tornado.autoreload
You can’t perform that action at this time.