Skip to content

Instantly share code, notes, and snippets.

Fred Daoud foxdonut

Block or report user

Report or block foxdonut

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
@foxdonut
foxdonut / index.ios.js
Created Nov 23, 2016
Meiosis on React-Native
View index.ios.js
import React, { Component } from 'react';
import { AppRegistry, Button, StyleSheet, Text, View } from 'react-native';
import { createComponent, run } from "meiosis";
// This is from the React Native hello world example.
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
View TodoForm.View.elm
[ button
[ class "btn btn-primary btn-xs"
, onWithOptions
"click"
{ preventDefault = True, stopPropagation = False }
targetValue
(always (Signal.message address (Save model.todo)))
]
[ text "Save" ]
View foldp.elm
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
type alias Model = String
type Action
= NoOp
| Show Model
@foxdonut
foxdonut / index.js
Created Feb 10, 2016
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var most = require("most");
var h = require("virtual-dom/h");
var diff = require("virtual-dom/diff");
var patch = require("virtual-dom/patch");
var createElement = require("virtual-dom/create-element");
var match = function(query) {
return function(evt) {
@foxdonut
foxdonut / index.js
Last active Dec 14, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var Maybe = require("data.maybe");
var f1 = function(input) {
console.log("f1");
return null;
};
var f2 = function(input) {
console.log("f2");
@foxdonut
foxdonut / README.md
Created Nov 30, 2015
Simple React Hello World
View README.md

Simple React Hello World

Run these commands:

npm i
npm start

You only have to run npm i the first time.

@foxdonut
foxdonut / index.js
Created Nov 17, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var most = require("most");
var h = require("virtual-dom/h");
var diff = require("virtual-dom/diff");
var patch = require("virtual-dom/patch");
var createElement = require("virtual-dom/create-element");
var match = function(query) {
return function(evt) {
View todolist.json
[
{
"description": "Buy more beer",
"id": 1,
"priority": 1
},
{
"description": "Order pizza",
"id": 2,
"priority": 1
You can’t perform that action at this time.