Skip to content

Instantly share code, notes, and snippets.

@vmartins
vmartins / mame-roms2.md
Last active May 3, 2024 02:08
MAME download all roms arcade (2/2)
@vmartins
vmartins / mame-roms1.md
Created September 27, 2022 17:49
MAME download all roms arcade (1/2)
@aranega
aranega / gmf-notation-pyecore.md
Last active May 3, 2024 02:05
This little guide show how to generate the Python/PyEcore code for the GMF Notation metamodel using pyecoregen

GMF Notation Model for Python

This little tutorial shows "in depth" how to generate Python/PyEcore code for the GMF-Notation metamodel using pyecoregen.

Generating the Metamodel Code

First, due to some dependencies expressed in the GMF Notation .ecore (relative paths towards other .ecore), it is required to have the full GMF Notation

@aranega
aranega / microreflexivekernel.py
Last active May 3, 2024 02:04
Micro reflexive MDE-like kernel in Python
class MList(object):
def __init__(self, owner, feature):
self.innerlist = []
self.owner = owner
self.feature = feature
def size(self):
return len(self.innerlist)
def append(self, value, update_opposite=True):
@PopupAsylumUK
PopupAsylumUK / HexGridLayout.cs
Last active May 3, 2024 02:04
A Layout group for arranging children in a hexagon grid, and a Hexagon graphic
using UnityEngine;
using UnityEngine.UI;
public class HexGridLayout : LayoutGroup {
const float SQUARE_ROOT_OF_3 = 1.73205f;
public enum Axis { Horizontal = 0, Vertical = 1 }
public enum Constraint { Flexible = 0, FixedColumnCount = 1, FixedRowCount = 2 }
@aranega
aranega / plantumlgen.py
Last active May 3, 2024 02:04
Quick ecore to plantuml generator in Python using PyEcore
from pyecore.resources import ResourceSet
from pyecore.utils import dispatch
import pyecore.ecore as ecore
class PlantUMLSwitch(object):
def __init__(self):
self.visited = set()
@dispatch
@fdv
fdv / .tmux.conf
Last active May 3, 2024 02:02
Emoji / UTF-8 in IRSSI with tmux. Tested on FreeBSD 11.3 with zsh 5.6.2, tmux 2.7 and irssi 1.1.1 or later
#
set -g default-terminal screen-256color
set -g status-bg blue
set -g status-fg white
set -g status-right '#(sysctl vm.loadavg)'
setw -g window-status-current-attr underscore
bind r source-file ~/.tmux.conf
require 'nokogiri'
require 'open-uri'
require 'cgi'
episodes = Array.new
doc = Nokogiri::HTML(open("http://www.notificationcenter.tv/feed.rss"))
episodes = doc.xpath("//item")
@aranega
aranega / validator.py
Created May 19, 2019 16:20
A WIP about model validation for PyEcore
from pyecore.ecore import *
from pyecore.resources import ResourceSet
from pyecore.utils import dispatch
from enum import unique, Enum
from functools import wraps
import pyecore.ecore as ecore
from collections import namedtuple