Skip to content

Instantly share code, notes, and snippets.


Fotis Papadogeorgopoulos fpapado

View GitHub Profile
fpapado / 01_failing.js
Created Mar 18, 2018
nanotiming overlapping timers
View 01_failing.js
// Three operations (loops for simplicity).
// We want to time the first two separately and all three of them together.
// Ideally, the ordering of starting the timers would not matter.
// This case fails because the timer for the first two loops is started first
var nanotiming = require('nanotiming')
try {
var performance = require('perf_hooks').performance
var timeFirstTwo = nanotiming('my-loop')
View nested_updates_01.elm
module Main exposing (..)
-- Using, newWhatever and inline functions
import Dict exposing (Dict)
type alias Model =
{ something : String
, somethingElse : String
View index_injecting.ts
import xs, { Stream } from 'xstream';
import { initModule, MyMsg } from './module_injecting';
// Stuff
start: function(listener) {
someSource$.subscribe(msg => {
// do stuff with someSource$ to get it in shape
fpapado / index.html
Last active Dec 19, 2017
PouchDB Replication Check
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>PouchDB Replication</title>
<script src=""></script>
<script src=""></script>
fpapado / Box.js
Created Dec 6, 2017 — forked from tkh44/Box.js
styled-system with emotion.
View Box.js
import styled, { css } from 'emotion/react'
import { space, width, fontSize, color, responsiveStyle } from 'styled-system'
export const display = responsiveStyle('display')
export const flex = responsiveStyle('flex')
export const order = responsiveStyle('order')
const wrap = responsiveStyle('flex-wrap', 'wrap', 'wrap')
const direction = responsiveStyle('flexDirection', 'direction')
const align = responsiveStyle('alignItems', 'align')