Skip to content

Instantly share code, notes, and snippets.

FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.


Effective Engineer - Notes

What's an Effective Engineer?

@orendon
orendon / System Design.md
Created January 20, 2018 21:10 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Eileen M. Uchitelle

Ingeniera de Sistemas Senior en GitHub. Soy una ávida contribuidora Open Source y estoy en el Rails Core Team y en el Rails Security Team. Disfruto hablar en conferencias, por lo general sobre el rendimiento o sobre contribuciones Open Source. Aparte de escribir código, me gusta la cerveza artesanal y senderismo con mi marido, Abe y nuestro perro, Arya.

Konstantin Haase

Co-Fundador y CTO en Travis CI, ex estrella de la ópera. Konstantin se describe a sí mismo como un "entusiasta del Open Source" y contribuye a una serie de proyectos de Ruby, incluyendo Ruby on Rails, Rack y Rubinus. Konstantin es también el actual mantenedor de Sinatra y bajo su dirección Sinatra se ha transformado en un

@orendon
orendon / humanize-schema-errors.clj
Created February 12, 2017 01:02 — forked from rauhs/humanize-schema-errors.clj
Translate prismatic's schema.core errors to a human readable form. Use this for presenting validation errors to users. Don't use this for programming errors like a missing map key etc.
(ns x.y
(:use [plumbing.core]) ;; Just for the map-vals
(:require [clojure.walk :refer [postwalk prewalk prewalk-demo postwalk-demo]]
[clojure.core.match :refer [match]]
[schema.utils :refer [named-error-explain validation-error-explain]]
[schema.core :as s])
(:import (schema.utils NamedError ValidationError)))
;; Partially FROM:
;; https://github.com/puppetlabs/clj-schema-tools
@orendon
orendon / mini.clj
Created December 21, 2016 16:03 — forked from sarcilav/mini.clj
(defn permutations [s]
(lazy-seq
(if (seq (rest s))
(apply concat (for [x s]
(map #(cons x %) (permutations (remove #{x} s)))))
[s])))
(defn cost [proposoals s]
{:permutation s
:cost (apply + (map-indexed (fn [project candidate-str]
@orendon
orendon / cp-env-to-properties.sh
Created October 19, 2016 20:54 — forked from danielgomezrico/cp-env-to-properties.sh
Gradle / Bash - copy all env variables to app/gradle.properties (used to copy secret env vars from travis or circle CI to build android projects)
#!/usr/bin/env bash
#
# Copy env variables to app module gradle properties file
#
set +x // dont print the next lines on run script
echo $(printenv) | tr ' ' '\n' > app/gradle.properties
set -x
#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiServer.h>
#include <WiFiUdp.h>
#include <SPI.h>
char ssid[] = "NULL_INDUS"; // your network SSID (name)
char pass[] = "90046686"; // your network password

Advanced Functional Programming with Scala - Notes

Copyright © 2017 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

(my response to https://twitter.com/apotonick/status/717105889845624832)

I haven't yet came across readily available resources for large-scale application architecture for Elixir apps. I found Programming Phoenix to be a good start for that though. And there's ~30 years of knowledge in the Erlang land :)

For web apps, I found the abstractions that Elixir/Phoenix provides to be really helpful. Indeed, the list below is somewhat ORM focused.

In the small, Ecto.Schema, Ecto.Query, Ecto.Changeset, and Phoenix.View allow me to build highly composable and side-effect free modules. I can have many schemas, changesets and queries all interacting with the same underlying DB table(s) if I want to. Most of the side-effects (through Ecto.Repo for DBs) are usually in the Phoenix.Controller (or other Plugs).

@orendon
orendon / random-uuid.clj
Last active July 14, 2016 12:34 — forked from gorsuch/gist:1418850
clojure uuid guid uid
(defn uuid [] (str (java.util.UUID/randomUUID)))