Skip to content

Instantly share code, notes, and snippets.

@vovateleport
vovateleport / gist:252337d9b9627a9838f821ca3b7b8567
Created September 4, 2019 07:31
How to merge git repos into one
mkdir projTotal
cd projTotal
git init
git commit --allow-empty -m "Initial commit"
#add any number of projects
git remote add -f proj [email protected]
git merge --allow-unrelated-histories proj/master
mkdir subProj
ls -a -1 > proj.files
@vovateleport
vovateleport / howto-akka-https.md
Created November 29, 2016 11:20
Как настроить https в akka-http
@vovateleport
vovateleport / gitBash_windows.md
Created October 1, 2016 15:29 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows is bundled with "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on). If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corrisponding directories. Sometimes the windows binary have funny prefixes, so you should rename the exe file to the

@vovateleport
vovateleport / install.sh
Created October 1, 2016 15:29 — forked from mnn/install.sh
Ammonite REPL installation with MinGW
mkdir -p ~/.ammonite && wget -O ~/.ammonite/predef.scala --no-check-certificate https://git.io/v6r5y
wget -O amm --no-check-certificate https://git.io/vioDM && chmod u+x amm && ./amm
@vovateleport
vovateleport / ShapelessKeysAndTypeNames.scala
Created September 27, 2016 13:43
Get keys and field types of a case class with Shapeless
load.ivy("com.chuusai" %% "shapeless" % "2.3.0")
@
import scala.reflect._
import shapeless._
import shapeless.record._
import shapeless.labelled._
import shapeless.ops.record._
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import org.scalajs.dom._
object Portal {
def apply(kidz: ReactElement*) = component(Props(kidz))
case class Props(kidz: Seq[ReactElement])
private val component = ReactComponentB[Props]("Portal")
@vovateleport
vovateleport / build.sbt
Created June 29, 2016 13:02
slick gen tables
import sbt.Project.projectToRef
lazy val slickV = "3.1.1"
lazy val scalaV = "2.11.8"
lazy val commonSettings = Seq(
scalaVersion := scalaV,
name := "playslick",
version := "1.0"
)
@vovateleport
vovateleport / init-scala.sh
Last active September 11, 2015 10:16 — forked from maciej/init-scala.sh
Bootstrap a Scala project (with SBT + IDEA)
#!/bin/bash
PROJECT_NAME="$1"
SCALA_VERSION="2.9.1"
SCALATEST_VERSION="1.6.1"
MOCKITO_VERSION="1.8.5"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
@vovateleport
vovateleport / gist:179e755f33044f3aa816
Last active September 9, 2015 13:17 — forked from leodagdag/gist:3183045
linux init script for playframework 2
#!/bin/sh
### BEGIN INIT INFO
# Provides: playframework
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop playframework
### END INIT INFO
#
@vovateleport
vovateleport / import.js
Created August 13, 2015 15:32
iojs code demo
var _ = require('lodash');
var sh = require('shelljs');
var fs = require('fs');
var path = require('path');
var c = require('./testc');
var merger = require('./merge-styles');
var minimist = require('minimist');
var _wr = null;//context