Skip to content

Instantly share code, notes, and snippets.

View andyczerwonka's full-sized avatar

Andy Czerwonka andyczerwonka

View GitHub Profile
import scala.util.Try
/**
* Type-safe UUID wrapper that encodes the type it relates to. This class explicitly hides its
* UUID value to prevent converting it between types.
*/
class UUID[A] private(private val uuid: UUID.Raw) {
override def toString = uuid.toString
}
@andyczerwonka
andyczerwonka / R_Github_Api.R
Created January 20, 2018 13:59 — forked from mGalarnyk/R_Github_Api.R
Reading Data From GitHub API Using R. This code was originally for the John Hopkins Data Science Specialization. Blog on it https://medium.com/@GalarnykMichael/accessing-data-from-github-api-using-r-3633fb62cb08#.toufbbjgd
#install.packages("jsonlite")
library(jsonlite)
#install.packages("httpuv")
library(httpuv)
#install.packages("httr")
library(httr)
# Can be github, linkedin etc depending on application
oauth_endpoints("github")

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@andyczerwonka
andyczerwonka / nginx.conf
Created January 9, 2016 00:54 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
[merge]
summary = true
tool = "p4"
[mergetool "p4"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge \
"$PWD/$BASE" \
"$PWD/$LOCAL" \
"$PWD/$REMOTE" \
"$PWD/$MERGED"
import akka.actor.{Actor, Stash}
class PausableWorker extends Actor with Stash {
def receive = processing
def processing: Receive = {
case "pause" => context.become(paused)
case msg => // Process task
}
def paused: Receive = {