Skip to content

Instantly share code, notes, and snippets.

View kaneel's full-sized avatar

Guillaume Richard kaneel

View GitHub Profile
#include <stdlib.h>
#include <stdio.h>
typedef char EventName[255];
typedef union HandlerData {
int i;
float f;
char str[255];
} HandlerData;
typedef void (*EventHandler)(EventName event, HandlerData *data);
@kaneel
kaneel / dough.md
Last active July 14, 2021 08:09
Dough proportions

500 dough

This is the one all other are based on

  • levain 100
  • flour 500
  • water ~320
  • salt 11g

350 dough

/*
1 + 2 / 3 * 4
This example tests the precedence.
/*
(ROOT (OPERATOR +(LITERAL 1)(OPERATOR /(LITERAL 2)(OPERATOR *(LITERAL 3)(LITERAL 4)))))
/*
(1 + 2) / (3 * 4)
@kaneel
kaneel / i18nText.ts
Last active January 11, 2019 10:30
Quick i18n solution with a dict saved in a Redux store
import * as React from 'react';
import { connect } from 'react-redux';
import { Store } from '../../../store';
export interface I18nTextProps {
text: string | string[];
hasInnerHTML?: boolean;
vars?: any;
}
import * as React from 'react';
import { styled, StyledComponentClass } from '../styled';
interface IProps {
on?: boolean;
}
interface IState {
value: boolean;
@kaneel
kaneel / Radio.tsx
Last active January 11, 2019 10:19
Simple Radio Component that can take any children and wrap it into a Radio choice.
import * as React from 'react';
import { v4 as uuid } from 'uuid';
import { styled } from '../styled';
export interface IProps {
name: string;
}
const StyledRadio = styled.div`
@kaneel
kaneel / Revealer.tsx
Last active January 11, 2019 10:20
A simple text revealer (char by char), you could make different type of animations and make it optionable
import * as React from 'react';
import { styled, keyframes, StyledComponentClass } from '../styled';
export interface IProps {
onDoneHandler?: () => void;
}
export interface IState {
cursor: number;
@kaneel
kaneel / rlx-mini-user-guides-commons.js
Last active January 11, 2019 10:37
building block components for Rolex mini user-guides
define('views/mini-user-guides/rlx-mini-user-guides-commons', [
'utils'
, 'lib/Model'
, 'lib/ZenView'
, 'lib/UID'
, 'modules/rlx-stylesheet'
], function(_, Model, ZView, UID, Stylesheet) { 'use strict'
var exports = {}
var Seq = exports.Seq = _.classMaker(function(Super, statics) {

Keybase proof

I hereby claim:

  • I am kaneel on github.
  • I am mnmsknl (https://keybase.io/mnmsknl) on keybase.
  • I have a public key whose fingerprint is 3369 8572 D274 68F8 094B 9056 4389 B5FB 9F93 3EC9

To claim this, I am signing this object: