Skip to content

Instantly share code, notes, and snippets.

Install MySQL

See what formula are available.

brew search mysql
==> Formulae
@jonjack
jonjack / install-java-on-macosx-with-brew-&-jenv.md
Last active September 10, 2024 18:52
Install Java on Mac OSX via Home-brew

Notes on installing multiple versions Java on Mac OSX using Homebrew and Jenv.

Install Homebrew

Homebrew is a superb tool for Mac for managing the installation of software. It's core command is brew and it calls packages of software formula. If you are intrigued then you can check out the list of Formula in the brew Github repository.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@jonjack
jonjack / EcTest.scala
Created August 20, 2018 23:29
Demo of specifying an explicit Execution Context to a method to override a default implicit one.
object EcTest extends App {
import scala.concurrent.Future
import scala.concurrent.ExecutionContext
import java.util.concurrent.Executors
val default = scala.concurrent.ExecutionContext.Implicits.global
def test(comp: String)(implicit exc: ExecutionContext = default): Future[String] = Future {
@jonjack
jonjack / GitHub.Color.Scheme.for.IntelliJ.icls
Created September 25, 2017 08:19
GitHub Color Scheme for IntelliJ
<scheme name="GitHub.Color.Scheme.for.IntelliJ" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2017-09-15T15:53:07</property>
<property name="ide">Idea</property>
<property name="ideVersion">2017.2.4.0.0</property>
<property name="modified">2017-09-25T09:19:23</property>
<property name="originalScheme">GitHub</property>
</metaInfo>
<option name="LINE_SPACING" value="1.1" />
@jonjack
jonjack / create-sbt-project.sh
Last active October 6, 2017 08:37
Create a skeleton SBT project for Scala. Tested on OSX only.
#!/bin/sh
VERSION="0.1-SNAPSHOT"
SCALA_VERSION="2.12.3"
echo "Do you wish to use the current directory for the project root? (y/n)?"
echo "Note: If (n) then the project will be created in a sub-directory of the current one."
read answer
#!/bin/bash
# create directory for python install
sudo mkdir -p /opt/bin
sudo chown -hR core:core /opt
cd /opt
# check for newer versions at http://downloads.activestate.com/ActivePython/releases/
wget http://downloads.activestate.com/ActivePython/releases/3.6.0.3600/ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834.tar.gz
tar -xzvf ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834.tar.gz
// 3 sequential async calls
for {
aaa <- WS.url("http://aaa.com").get()
bbb <- WS.url("http://bbb.com").get()
ccc <- WS.url("http://ccc.com").get()
} yield {
// Construct th result using aaa, bbb, and ccc
}