Skip to content

Instantly share code, notes, and snippets.

Avatar
🙀
snafu

Andreas Köberle eskimoblood

🙀
snafu
View GitHub Profile
View SketchSystems.spec
My Awesome Sketch
Nothing Selected
click on bar -> One Bar Selected
shift click on bar -> Continious Bars Selected
One Bar Selected
click on same bar -> Nothing Selected
click on another bar -> One Bar Selected
shift click on another bar -> Non Continious Bars Selected
ctrl click on another bar -> Continious Bars Selected
move mouse -> Selection
@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: {}
};
You can’t perform that action at this time.