Skip to content

Instantly share code, notes, and snippets.

Franco Ponticelli fponticelli

Block or report user

Report or block fponticelli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LinkedList.h
#ifndef _LINKEDLIST_H
#define _LINKEDLIST_H
template <typename T>
class LinkedList {
public:
LinkedList();
~LinkedList();
void add(T value);
void remove(T value);
View index.ts
import { DOMView, div, up, button, down, when, repeat, Spoon } from './lib'
type State = { value: number }
class Adjust {
kind: 'adjust' = 'adjust'
constructor(
readonly value: number
) {}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am fponticelli on github.
  • I am fponticelli (https://keybase.io/fponticelli) on keybase.
  • I have a public key ASClK4h4qiVDpNzg0sTgtFiXxhsfEJNFAMqKidDMs8548Ao

To claim this, I am signing this object:

View FormData.purs
module Comp.FormData exposing (..)
type FormMessage u s
= UpdateForm u
| SubmitForm s
| ResetForm
type FieldStatus valid invalid
= FieldIsIncomplete
| FieldIsValid valid
@fponticelli
fponticelli / postgresql_color_adt.sql
Created Sep 19, 2017 — forked from mlms13/postgresql_color_adt.sql
Create a sum type for colors in sql
View postgresql_color_adt.sql
create type custom_color as (r smallint, g smallint, b smallint);
create type named_color as enum ('red', 'green', 'blue');
create type color as (named named_color, custom custom_color);
create or replace function check_color(c color) returns boolean as $$
begin
return
(c.named IS NOT NULL)::int +
@fponticelli
fponticelli / postgresql_color_adt.sql
Created Sep 19, 2017 — forked from mlms13/postgresql_color_adt.sql
Create a sum type for colors in sql
View postgresql_color_adt.sql
-- data NamedColor = Red | Green | Blue
-- data CustomColor = CustomColor
-- { r :: Int
-- , g :: Int
-- , b :: Int
-- }
-- data Color = NamedColor | CustomColor
create type custom_color as (r int, g int, b int);
@fponticelli
fponticelli / Actions.hx
Last active Apr 11, 2017
Free Monad in Haxe
View Actions.hx
using thx.Functions;
import thx.Unit;
import thx.promise.Promise;
using Actions;
enum Action<A> {
Move(x: Float, y: Float): Action<Unit>; // output
Feed(x: Float, y: Float): Action<Unit>;
ReadPosition: Action<Position>;
PromptPosition: Action<Position>; // input
View DoomDSL.hx
button("click me")
.large()
.danger()
.disabled()
button([
Content("click me"),
Large,
Danger,
Disabled
View Nano.hx
@:jsRequire("nano")
extern class Nano {
@:selfCall
public static function create(url: String): Nano;
}
View gist:04af2e8a32a864eb58f9111ccd6c7a40
### Keybase proof
I hereby claim:
* I am fponticelli on github.
* I am fponticelli (https://keybase.io/fponticelli) on keybase.
* I have a public key whose fingerprint is D665 0895 F02A 5D6F 3089 7965 9CEC 6A8B B344 787C
To claim this, I am signing this object:
You can’t perform that action at this time.