Skip to content

Instantly share code, notes, and snippets.

@kristian76
kristian76 / markup.html
Last active November 25, 2016 16:44
AB split testing in JS
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body>
<script>
var AB = {
@kristian76
kristian76 / index.js
Created January 30, 2017 13:58
React material UI planning board
/**
* index.js
*/
"use strict";
// Require app specific CSS
require('./app.css');
import React from 'react';
import ReactDOM from 'react-dom';
@kristian76
kristian76 / danish.json
Last active March 10, 2017 09:34
Javascript L10N idea, how to handle translations in Javascript and being able to serve the translations in a simple structure
/**
* Structure of the translations is a simple
* key value storage
*/
var L10N = {
"hello_kitty": "hej killing"
};
@kristian76
kristian76 / ProductSample.elm
Last active June 7, 2017 12:11
Display list of products using elm
module ProductSample exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
import String
@kristian76
kristian76 / index.js
Created October 2, 2017 06:59
React JS app for search dictionary feature
/**
*
*
*/
import { render } from 'react-dom';
import React from 'react';
class SearchDictionaryFieldsComponent extends React.Component {
constructor(props) {
super(props);
@kristian76
kristian76 / untitled.html
Created April 5, 2018 11:55
Populate drop down
<html>
<form>
<select id="parent">
<option value="set1">Set opt1</option>
<option value="set2">Set opt2</option>
</select>
<select id="child">
</select>
</form>
<script>