Skip to content

Instantly share code, notes, and snippets.

🙀
snafu

Andreas Köberle eskimoblood

🙀
snafu
Block or report user

Report or block eskimoblood

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
@eskimoblood
eskimoblood / gist:20fcc8b7994c1abcb192a07936885a4f
Created Jan 11, 2019
Simple test helper for testing recompose HOCs
View gist:20fcc8b7994c1abcb192a07936885a4f
import React from 'react'
import { mount } from 'enzyme'
const render = ({ hoc, data, context }) => {
const Component = () => <div />
const WrappedComponent = hoc(Component)
return mount(<WrappedComponent {...data} />, { context })
}
// By default, return the 'inner', wrapped component.
@eskimoblood
eskimoblood / PenroseTilling.elm
Last active Aug 29, 2015
Penrose Tiling in Elm
View PenroseTilling.elm
module Penrose where
import List(foldr, map)
import Graphics.Collage(..)
import Graphics.Element(..)
import Color(..)
goldenRatio = (1 + sqrt 5) / 2
type alias Point = (Float, Float)
type Triangle
= Kite (Point, Point, Point)
@eskimoblood
eskimoblood / BackgroundColor
Last active Aug 29, 2015
Nice way to have your private variables editable in a external window.
View BackgroundColor
import control.ControlFrame;
import processing.core.PApplet;
public class BackgroundColor {
private final PApplet p;
@ControlElement(properties = {"min=0", "max=255"}, x = 10, y = 10)
private float red = 0;
View jsbin.igIHeYe.css
div input, div label{
margin: 0;
position:relative;
left: -200px;
transition: .3s;
box-sizing:border-box;
float:left;
height: 30px
}
input{
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
@eskimoblood
eskimoblood / RegionRouter.js
Created Feb 20, 2013
Router that will just show a new view in a region. The router can be configurate by a simple map like this `{'someRoute/:id' : SomeView}`. So when ever a configured route matchs, the corresponding view will be shown in the passed region.
View RegionRouter.js
define(function() {
function getRouterSetting(region, routerSettings) {
var settings = {
appRoutes: {},
controller: {}
};
@eskimoblood
eskimoblood / index.html
Last active Dec 13, 2015
Flower of life
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="https://raw.github.com/bestiejs/lodash/v1.0.0/dist/lodash.min.js"></script>
</head>
<body>
<script>
You can’t perform that action at this time.