Skip to content

Instantly share code, notes, and snippets.

View everson's full-sized avatar

Johnny Everson everson

View GitHub Profile

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@elsonrodriguez
elsonrodriguez / gist:80ab3b7cff8b926b2d19
Created March 17, 2016 23:23
kubectl run override
time kubectl run --command --rm -i --tty java --image=java --restart=Never --overrides='{ "apiVersion": "extensions/v1beta1", "spec":{"template":{"spec": {"containers":[{"name":"java","image":"java", "imagePullPolicy":"Always"}]}}}}' -- uptime
@dpwiz
dpwiz / mini.elm
Last active April 27, 2019 01:46
A minimal Elm application with AJAX and Virtual DOM.
import Debug
import Graphics.Input as Input
import Html
import Html (..)
import Html.Attributes (..)
import Html.Events (..)
import Html.Tags (..)
import Http
import Window

Full-stack Software Developer

Are you a passionate web developer who wears skinny jeans, checks Foursquare before heading out & loves developing in Python and/or Javascript (or other languages you love)? We are looking for you!

Who we are

We are Second Funnel - a small, growing startup making the web more visually interesting & relevant. We believe advertising currently sucks and it can be made awesome. How? Through visual content that peeks your curiousity & leads to more related and interesting content (think: Pinterest meets marketing).

/*
The code below is not intended to be a general purpose approach, but rather a
simple CmdHandler / EventHandler model prototype that illustrates a concept of
how to share an Eventsourced Processor stream among many child actors of
same type.
Snapshotting is important for children in order to get quick start up and avoid
filtering too many sibling events.
@sigrlami
sigrlami / ab.md
Last active March 4, 2022 14:40
List of companies using Haskell https://haskellcosm.com

WARNING This list outdated, for the up to date version visit https://haskellcosm.com

List of companies that use Haskell in Production

Types of work:

  • RD - research&development
  • PR - product
  • IP - in-house product
  • CO - consulting
@viktorklang
viktorklang / git.plugin.zsh
Created May 10, 2013 16:09
A couple of nice additions to ZSH git plugin
*** /Users/viktorklang/.oh-my-zsh/plugins/git/git.plugin.zsh.old Fri May 10 18:07:33 2013
--- /Users/viktorklang/.oh-my-zsh/plugins/git/git.plugin.zsh Fri May 10 18:05:49 2013
*************** alias gcount='git shortlog -sn'
*** 14,19 ****
--- 14,21 ----
alias gcp='git cherry-pick'
alias glg='git log --stat --max-count=5'
+ alias grm='git branch -D'
+
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2024 16:53
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@akr4
akr4 / gist:2279505
Created April 1, 2012 23:44
Scala + Rome で RSS 出力
package com.fourseasonszoo.niboshi
import com.sun.syndication.io._
import com.sun.syndication.feed.synd._
import scala.collection.JavaConverters._
import org.scala_tools.time.Imports._
import scalax.io._
import java.io.StringWriter
object Main extends App {
@viktorklang
viktorklang / CQRS_ES_Actor.scala
Created February 1, 2011 15:05
CQRS and EventSourcing using Akka Actors
import scala.collection.mutable.ListBuffer
import akka.actor.{Actor,ActorRef}
import akka.actor.Actor._
import akka.routing.{ Listeners, Listen }
//Represents a domain event
trait Event
//A builder to create domain entities
trait EntityBuilder[Entity] {