Skip to content

Instantly share code, notes, and snippets.

View fabio-t's full-sized avatar

Fabio Ticconi fabio-t

View GitHub Profile
@andrewwippler
andrewwippler / centos_kickstart
Created April 2, 2018 15:14
Kickstart file for installing centos 7 on nve ssd and uefi
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$UzchDaR4$XXXXXXXXXX.XXXXXXX/
# System language
@jhosteny
jhosteny / building-a-cqrs-web-application-in-elixir-using-phoenix.md
Last active January 15, 2022 22:43
Building a CQRS/ES web application in Elixir using Phoenix

Background

I've been interested in Command Query Responsibility Segregation and event sourcing since hearing Greg Young talk on the subject in early 2010. During the past seven years I've built an open-source Ruby CQRS library (rcqrs); worked professionally on .NET applications following the pattern; and more recently built an Event Store (eventstore) and CQRS library (commanded) in Elixir.

Building applications following domain-driven design and using CQRS feels really natural with the Elixir -- and Erlang -- actor model. An aggregate root fits well within an Elixir process, which are driven by immutable messages through their own message mailboxes, allowing them to run concurrently and in isolation.

The web application I built to implement these ideas in Elixir was [Segment Challen

@sonirico
sonirico / ScriptSystem.java
Last active December 25, 2016 07:01
ScriptSystem, ECS pattern (artemis-odb).
package com.katodia.istariquest.systems;
import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.PooledComponent;
import com.artemis.World;
import com.artemis.systems.IteratingSystem;
import java.util.HashMap;
import java.util.Map;
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@lisaah
lisaah / convert_svg_to_pdf.sh
Created January 25, 2014 18:15
Simple shell script to convert all .svg in directory to .pdf
# Dependency:
# sudo apt-get install librsvg2-bin
find . -type f -name "*.svg" -exec bash -c 'rsvg-convert -f pdf -o $0.pdf $0' {} \;
@NathanSweet
NathanSweet / astar for libgdx
Last active March 27, 2024 13:12
A* for libgdx that is simple but optimized, includes runnable demo. Uses a binary heap for the open list. Nodes are cached in a PathNode[], which is also used to make finding a node in the open list fast. A "run id" is used to avoid needing to clear the nodes for a new run.
// A* for libgdx that is simple but optimized.
package test;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
@fabianp
fabianp / group_lasso.py
Created December 2, 2011 14:17
group lasso
import numpy as np
from scipy import linalg, optimize
MAX_ITER = 100
def group_lasso(X, y, alpha, groups, max_iter=MAX_ITER, rtol=1e-6,
verbose=False):
"""
Linear least-squares with l2/l1 regularization solver.