Skip to content

Instantly share code, notes, and snippets.

View nigelnindo's full-sized avatar

Nigel Nindo nigelnindo

View GitHub Profile
@jroper
jroper / SourceWithBackoffSupervision.scala
Last active March 12, 2018 14:22
Akka streams Source.restartWithBackoff
package streams.utils
import java.util.concurrent.ThreadLocalRandom
import akka.NotUsed
import akka.stream._
import akka.stream.scaladsl.Source
import akka.stream.stage._
import scala.concurrent.duration._

Getting Started in Scala

This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere…  I hope to present the information you need without assuming anything.

Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!

One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.

Getting the JVM

@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

import React, {
Component,
} from 'react';
import {
StyleSheet,
Text,
View,
Animated,
Easing,
package com.timmeh.openhr.openholidays.model
import slick.driver.H2Driver.api._
import slick.collection.heterogeneous._
import syntax._
//// This file demonstrates how to map more than 22 columns to a nested case class using a HList
class LargeTableExample3(tag: Tag)
extends Table[LargeUnnestedTableRow](tag, "LARGE_TABLE") {
def id = column[Int]("ID", O.PrimaryKey)
@developmentalmadness
developmentalmadness / RunQuery.scala
Created February 23, 2016 19:55
Query postgresql database using Slick streaming
package com.dvMENTALmadness
import akka.actor.ActorSystem
import slick.driver.PostgresDriver.api._
import scala.collection.immutable.Stream._
import scala.concurrent.duration._
import scala.concurrent.{Future, Await}
import akka.stream._
import akka.stream.scaladsl._
@squarism
squarism / iterm2.md
Last active April 26, 2024 19:19
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
<br /><br />
# React Native: Animated
ReactEurope 2015, Paris - Spencer Ahrens - Facebook
<br /><br />
## Fluid Interactions
- People expect smooth, delightful experiences
@sahrens
sahrens / React Native: Animated - Code
Last active July 4, 2020 00:07
Example code from ReactEurope 2015 talk - React Native: Animated
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@andrewpmiller
andrewpmiller / osx-BTaudio-Fix.md
Last active March 14, 2019 19:09
A simple terminal command to improve OSX Bluetooth audio