Skip to content

Instantly share code, notes, and snippets.

View robinweser's full-sized avatar

Robin Weser robinweser

View GitHub Profile
!regional&!costume&!legendary&!shadow&!favorite&!xl trade&!pvp&!pvp push&!pvp push&!mythical&!pvp push+&!shiny&!ultra beasts&!4*&!unown&!exclusive&!spinda
// this is exported by "some-package"
export default function El({ as: Component = "div", ...props }) {
return <Component {...props} />
}
@robinweser
robinweser / run.js
Last active February 27, 2019 18:21
Fernuni Psychology Point Calculator
function getQuestionPoints(number, highlight) {
var question = document.getElementsByClassName("content")[number - 1];
var rightAnswer = question.getElementsByClassName("rightanswer")[0].innerText;
var answers = question.getElementsByClassName("answer")[0];
var answerMap = {};
for (var i = 0; i < answers.children.length; ++i) {
var child = answers.children[i];
const store = {
model: {
data: undefined,
errors: [],
loading: false,
},
actions: {
setLoading: (state, loading) => ({
...state,
loading,
fetch(`https://bundlephobia.com/api/size?package=${packageName}`)
.then(res => res.json())
.then(({ size, gzip }) => /* do something */)
@robinweser
robinweser / HttpLink.js
Created January 11, 2019 07:26
OneGraph Apollo Integration
.Button {
background-color: rgb(90, 180, 90);
font-size: 15px;
border-radius: 15px
}
.Button:hover {
background-color: rgba(67, 148, 67, .7)
}
@robinweser
robinweser / index.js
Created August 16, 2018 21:07
react-controlled-form implemented with react-woodworm
import { Component } from 'react'
import { createStore } from 'react-woodworm'
const FormStore = createStore({
model: {
data: {},
state: {},
},
actions: {
updateField: ({ state, data }, payload) => {
@robinweser
robinweser / i.js
Created October 28, 2017 19:22
parsing shorthands
/* @flow */
import { parse, generate } from 'bredon'
import {
isCSSValue,
isHexColor,
isDimension,
isFunction,
isInteger,
isIdentifier
} from 'bredon-types'
// before
const rule = ({ fontSize, color }) => ({
fontSize: fontSize,
color: color,
backgroundColor: 'black',
lineHeight: 1.0,
':hover': {
color: 'red'
},
'@media (min-width: 300px)' {