Skip to content

Instantly share code, notes, and snippets.

@graninas
graninas / haskeller_competency_matrix.md
Last active April 25, 2024 20:48
Haskeller competency matrix

Haskeller Competency Matrix

See also List of materials about Software Design in Haskell

Junior Middle Senior Architect
Haskell level Basic Haskell Intermediate Haskell Advanced Haskell Language-agnostic
Haskell knowledge scope Learn you a Haskell Get programming with Haskell Haskell in Depth Knows several languages from different categories
Get programming with Haskell Haskell in Depth Functional Design and Architecture
[Other books on Software Engineering in Haskell](https://github.com/graninas/software-design-in-haskell#B
@jdegoes
jdegoes / DynamoDB.scala
Created April 24, 2020 16:58
ZIO DynamoDB
package zio.dynamodb
import java.io.IOException
import zio.{ Chunk, Task, ZLayer }
import zio.blocking.Blocking
/*
~~GetItem~~
WriteItem

Here is a non-exhaustive list of libraries that are known to support Scala.js 1.x at the moment. They are shown with sbt libraryDependencies syntax, and grouped by organization.

Libraries

"org.scala-js" %%% "scalajs-dom" % "1.0.0"
"org.scala-js" %%% "scalajs-java-time" % "1.0.0"
"org.scala-js" %%% "scalajs-java-logging" % "1.0.0"
@vicly
vicly / Domain_Event_vs_Integration_Event.md
Last active January 22, 2021 01:43
[Arch Note] #Arch

Domain events**

  • run in memory, only for intra-domain communication, within the same transaction scope
  • raised from the domain entity class before transaction is committed

Integration events

  • cross transactions, to propagate state changes to other microservices

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
@ibaca
ibaca / ElementoFileDndUploadExample.java
Created July 15, 2017 07:33
GWT Elemento file drop onto a browser div and then upload the file example.
package dnd;
import static elemental2.dom.DomGlobal.document;
import static org.jboss.gwt.elemento.core.EventType.dragend;
import static org.jboss.gwt.elemento.core.EventType.dragover;
import static org.jboss.gwt.elemento.core.EventType.drop;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import elemental2.dom.DataTransfer;
@branflake2267
branflake2267 / ToolbarExample.java
Last active August 18, 2016 16:13
GXT and ExtJs Example using JsInterop and Jsni rendering a Toolbar
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.sencha.gwt.jsinterop.examples.processor.Example;
import com.sencha.gxt.core.client.dom.XElement;
import com.sencha.gxt.widget.core.client.button.TextButton;
@heathermiller
heathermiller / scala-cheatsheet.md
Last active May 11, 2024 14:06
Scala Cheatsheet

This cheat sheet originated from the forum, credits to Laurent Poulain. We copied it and changed or added a few things.

Evaluation Rules

  • Call by value: evaluates the function arguments before calling the function
  • Call by name: evaluates the function first, and then evaluates the arguments if need be
    def example = 2      // evaluated when called
    val example = 2      // evaluated immediately
@ttp
ttp / server_configuration.md
Created April 5, 2015 06:13
New Ubuntu server configuration nginx, ruby, passenger, postgresql, php, wordpress, mysql

Locale fix

sudo vim /etc/default/locale

LANGUAGE=en_US.UTF-8
LANG=en_US.UTF-8
LC_TYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8

reconfigure locales