Skip to content

Instantly share code, notes, and snippets.

Jonas Lundberg jonaslu

Block or report user

Report or block jonaslu

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
@jonaslu
jonaslu / diff_js_object.js
Last active Feb 7, 2017
Deep diffing a js-object ignoring arrays
View diff_js_object.js
const test1 = {
k0: 1,
k1: 1,
k3: 3,
k4: {
c: 4
},
k5: {
c: 2
}
View bare-bare-super-minimal-bones-blogger-template_really.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
&lt;!-- /*<b:skin><![CDATA[*/]]></b:skin>
</head>
<body>
<h1>TEEEST</h1>
<b:section class='main' id='main' name='Main' showaddelement='no'/>
@jonaslu
jonaslu / pike_and_kerningham_regex_engine.py
Last active Jul 9, 2016
Python version of the regex-engine in Pike and Kerningham: Practice of programming.
View pike_and_kerningham_regex_engine.py
def match(text, regex):
if not regex:
return True
if regex[0] == '^':
return matchFirst(text, regex[1:])
else:
return matchInString(text, regex)
def matchInString(text, regex):
if not regex:
@jonaslu
jonaslu / spikeTodo.elm
Last active May 29, 2016
First try of a todo-app in elm. It works but it ain't pretty. Created with my parter in crime @popstr
View spikeTodo.elm
import Html exposing (..)
import Html.App exposing (beginnerProgram)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import List exposing (..)
import String
main =
beginnerProgram { model = model, view = view, update = update }
You can’t perform that action at this time.