Skip to content

Instantly share code, notes, and snippets.

View Ahrengot's full-sized avatar
🤟

Jens Ahrengot Boddum Ahrengot

🤟
View GitHub Profile
{
"id": "1bd4f0f15ab6e834e41a13955a1ec451",
"type_id": "a6c9fc333a8c76695f71dd7d166a56b7",
"title": "Content",
"secondary_title": "",
"value": "",
"language": "sv"
}
{
"id": "c702b4850395daf03ad0e79e5be4dbb0",
"type_id": "a6c9fc333a8c76695f71dd7d166a56b7",
"title": "Content",
"secondary_title": "",
"value": "<p>Content tekst...</p>\n<p><br></p>\n<p>Maecenas faucibus mollis interdum. Cras mattis consectetur purus sit amet fermentum. Cras mattis consectetur purus sit amet fermentum. Maecenas sed diam eget risus varius blandit sit amet non magna. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>\n<p><br></p>\n<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>\n<p><br></p>\n<p>Her er et link: <a title=\"
import _ from 'underscore';
import ImageLoader from '../util/image-loader';
const getScreenSize = width => {
const sizeBreakpoint = 900;
return width > sizeBreakpoint ? 'lg' : 'sm';
}
module Request.CaseData exposing (put)
import Data.Case exposing (CaseData)
import Json.Decode as Decode exposing (Decoder)
import Json.Decode.Pipeline as Pipeline exposing (decode, required)
import Json.Encode as Encode exposing (Value)
import Http
import HttpBuilder
module View.Repeater exposing (viewRepeater, update, Msg)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Keyed as Keyed
import Dom exposing (focus)
import Task
import Array
{-
highlightMatches
Wraps matches in `<strong>` elements and returns a list of Html
If no matches are found then return a list with a single child
containing the original string wrapped in a `<span>`
-}
highlightMatches : String -> String -> List (Html Never)
@Ahrengot
Ahrengot / weather-saga.js
Created March 21, 2017 10:00
Redux Saga example
import {
call,
put,
takeLatest
} from 'redux-saga/effects'
import {
UPDATE_QUERY,
WEATHER_DATA_REQUESTED,
/**
* Babel.js
* Source:
class Component {
constructor(msg = "hi") {
this.msg = msg;
}
@Ahrengot
Ahrengot / elm-haversine-formula.elm
Created March 17, 2017 09:48
Haversine formula for calculating distance between two lat/lon coordinate sets.
distanceInKm : Float -> Float -> Float -> Float -> String
distanceInKm lon1 lat1 lon2 lat2 =
let
-- Radius of The Earth in km
-- Use 3958 for miles
earthRadius =
6371
dLat =
degrees (lat2 - lat1)
<?php
/**
* Configure your routes here
* Slugs and page titles are translatable
*/
$routes = array(
"my-profile" => array(
"slug" => __( "my-profil" ),
"title" => __( "My profile" )