Skip to content

Instantly share code, notes, and snippets.

Marcus Ljungblad archie

Block or report user

Report or block archie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@archie
archie / notes.txt
Created Jun 29, 2015
Notes from More Women in Tech meetup #cphftw
View notes.txt
Sponsors
Rainmaking Loft
- how do we look at startups, not only funding and practical stuff
- looking at diversity as a metric when deciding who can stay at the loft
IBM
- contributing in a wide capacity
- Women in Tech 51% overall, 26% in IT
- 3% tech companies are funded by women, 6.5 % have female ceo, venture backed
- 12% of CS degrees, in the 80s same fig was 37%, 2012 18%
@archie
archie / upptec_pipes.ex
Last active Aug 29, 2015
Playing with pipes in Elixir
View upptec_pipes.ex
defmodule Upptec do
def study(topics, match) do
Stream.filter(topics, fn topic -> Regex.match?(match, topic) end)
end
def consider(topics, time_available) do
Stream.map(topics, fn topic ->
duration = :random.uniform(time_available)
{topic, duration}
end)
@archie
archie / gist:11136979
Created Apr 21, 2014
curl -I aftonbladet.se
View gist:11136979
% curl -I www.aftonbladet.se
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=edge,chrome=1
Content-Type: text/html;charset=utf-8
Vary: Accept-Encoding,X-AB-Device-Type
X-Varnish: 1951083729
Via: 1.1 varnish
Cache-Control: private,s-maxage=0
@archie
archie / ddd_cqrs_es.md
Last active May 20, 2019
Draft blog post about ddd, cqrs, and es.
View ddd_cqrs_es.md

DDD, CQRS and Event Sourcing

In preparation for a new gig I'm reading up on the terms Domain-Driven Design, Command-Query Responsibility Segregation, and Event Sourcing. Here are a list of useful texts and talks that I've discovered so far. If anything is missing please leave a comment.

DDD

View demokratiappen_api.md

Demokratiappen API

Draft 1

Inspiration gathered from Foursquare and Bit.ly APIs.

Guidelines

Request/Response formats

View bytecode wildcards
public void process3(java.util.List<?>);
Code:
0: aload_1
1: invokeinterface #2, 1 // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
6: astore_2
7: aload_2
8: invokeinterface #3, 1 // InterfaceMethod java/util/Iterator.hasNext:()Z
13: ifeq 31
16: aload_2
17: invokeinterface #4, 1 // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
@archie
archie / Viewer.java
Last active Aug 29, 2015
Exploring wildcard types, or the so called question mark type, in Java.
View Viewer.java
package wild;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Viewer {
public void process1(List<Object> items) {
for (Object i : items)
@archie
archie / ParentChild.scala
Created Dec 13, 2013
Examples of testing Akka actor parent-child relationships, mostly based on findings from https://www.assembla.com/spaces/akka/tickets/3043#/activity/ticket:
View ParentChild.scala
package pc
import akka.actor.Actor
import akka.actor.Props
import akka.actor.ActorRef
import akka.actor.ActorRefFactory
class Parent extends Actor {
val child = context.actorOf(Props[Child], "child")
var ponged = false
@archie
archie / EchoSpec.scala
Last active Dec 30, 2015
This does not compile since ImplicitSender depends on TestKit and not TestKitBase. Error message: "illegal inheritance; self-type demo.EchoSpec does not conform to akka.testkit.ImplicitSender's selftype akka.testkit.ImplicitSender with akka.testkit.TestKit [---] line 18"
View EchoSpec.scala
package demo
import org.scalatest._
import akka.testkit.TestKit
import akka.actor.Actor
import akka.actor.ActorSystem
import akka.testkit.TestKitBase
import akka.testkit.ImplicitSender
import akka.actor.Props
@archie
archie / Log.scala
Created Nov 25, 2013
Using "Pimp my library" pattern to add customised functionality to a Scala Vector.
View Log.scala
package raft
import scala.language.implicitConversions
import akka.actor.ActorRef
abstract class Entry[T](val command: T, val term: Int, val sender: (ActorRef, Int))
case class StringEntry(
override val command: String,
override val term: Int,
You can’t perform that action at this time.