Skip to content

Instantly share code, notes, and snippets.

View xvw's full-sized avatar

Xavier Van de Woestyne xvw

View GitHub Profile
@xvw
xvw / id
Created December 8, 2022 17:02
Tezos Id
I am attesting that this GitHub handle xvw is linked to the Tezos account tz1gptNykuiTaYvGECzLNPDbZ9ybcQxwHhD4 for tzprofiles
sig:edsigu6wEFmoPiFihtWKduD187uTiky4dhEXvqP5XVxyCLrzmbKEo2ZUjRnTm7zks4YEk6eCx5sjaBAf62tywxTqyzVoxVQcHXx
(function() {
const _BoaGameCharacterUpdate = Game_Character.prototype.update;
const checkEvent = function(ev, id) {
if(typeof ev === 'undefined' || ev === null) {
throw new Error('Event ' + id + " does not exists!");
}
}
open Util
module Make (A : Sigs.Applicative.REQUIREMENT) :
Sigs.Applicative.API with type 'a t = 'a A.t = struct
module F = Functor.Make (struct
type 'a t = 'a A.t
let pure = A.pure
let map f x = A.ap (pure f) x
end)
@xvw
xvw / qube.ml
Created January 15, 2019 16:47
open Bedrock
open Util
open Error
type quote =
| Double
| Backtick
type t =
| Atom of string
type ('a, 'b) machine =
| Continue of 'a
| Done of 'b
module Kind :
sig
type 'a t =
| Eq of 'a
| Del of 'a
@xvw
xvw / csv.ml
Last active August 13, 2018 11:50
module type S = Util.SERIALIZABLE
module Kind =
struct
type t =
| Int
| Float
| String
| Boolean
| Optional of t
defmodule SerializeExample do
defmodule Human do
@derive [Poison.Encoder]
defstruct [:name, :age]
def new(name, age) do
%__MODULE__{name: name, age: age}
end
class Human
attr_accessor :name, :age
def initialize(name, age)
@name = name
@age = age
end
# Serialization (to JSon) by hand
=begin
Attention, l'utilisation de ce script rend le jeu injouable. Il n'est
utile QUE pour générer un fichier compatible avec RPGMaker XP et l'AMS
Ultimate (et rendre le mapping des hauteurs un peu plus sexy :) )
## Installation
- Copier le script "au dessus de Main" (dans la rubrique Material par exemple)
## Utilisation
module Zipper.History
exposing
( History
, new
, push
, present
, backward
, forward
, hasPast
, hasFuture