Skip to content

Instantly share code, notes, and snippets.

View Bunyod's full-sized avatar
🎯
Focusing

Bunyod Bunyod

🎯
Focusing
  • Enfore
View GitHub Profile
@Bunyod
Bunyod / GitHook.md
Last active November 12, 2019 08:50

Git hook manager

pre-commit-hook vs overcommit

Both are tools tool to manage and configure Git hooks. These tools don’t allow you to push if in your code something is not satisfactory with your configuration file. Configuration files:

  • .scalafmt - use by pre-commit-hook (by default)
  • scalastyle-config.xml - use by overcommit (by default)

What is overcommit for Scala developer?

@Bunyod
Bunyod / howto.md
Created May 24, 2018 10:04 — forked from adamcharnock/howto.md
Kubernetes install on Ubuntu 17.10 via kubeadm

Kubernetes install on Ubuntu 17.10 via kubeadm

Initial setup

apt-get update
apt-get upgrade
apt-get install curl

# Check VXLAN exists
@Bunyod
Bunyod / setup-kubernetes-ubuntu-16.md
Created May 24, 2018 10:04 — forked from ruanbekker/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 16

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@Bunyod
Bunyod / scalaskilset.markdown
Created December 12, 2016 07:27 — forked from razie/scalaskilset.markdown
Scala skill levels
@Bunyod
Bunyod / Pagination.scala
Last active May 24, 2019 23:49
Print a document as a book
package utils
/**
* @author Bunyod Bobojonov (bunyodreal@gmail.com). Created at 6/1/16.
*/
object Pagination {
def main(args: Array[String]): Unit = {
println("Hello World from main function!")
var evens = ""
@Bunyod
Bunyod / Entities.scala
Created October 27, 2016 07:27
Slick one to many and grouping
object Entities {
case class Review(txt: String, userId: Long, id: Long)
case class User(name: String, id: Long)
case class ReviewEvent(event: String, reviewId: Long)
case class FullReview(r: Review, user: User, evts: Seq[ReviewEvent])
}
@Bunyod
Bunyod / Play2SlickBridge.scala
Last active September 17, 2015 11:08 — forked from nraychaudhuri/Play2SlickBridge.scala
Play2-Auth and Slick together
//Trait that bridges between slick and Play2-auth. Just mixin with controllers
trait Auth2SlickBridge {
self: StackableController =>
def AuthAction[A](p: BodyParser[A], params: AttributeKey[_]*)(f: RequestWithAttributes[A] => Action[A]): Action[A] = {
AsyncStack(p, params:_*) { implicit rs =>
f(rs).apply(rs)
}
}