Skip to content

Instantly share code, notes, and snippets.

View jdudek's full-sized avatar

Jan Dudek jdudek

View GitHub Profile
@jdudek
jdudek / keybase.md
Created October 15, 2020 03:15
keybase.md

Keybase proof

I hereby claim:

  • I am jdudek on github.
  • I am jdudek (https://keybase.io/jdudek) on keybase.
  • I have a public key ASB4TLvGU86EvpINql2178lo8cj6xaSIzrUnO9236atnJQo

To claim this, I am signing this object:

@jdudek
jdudek / .gitattributes
Created July 3, 2018 19:36
Git: visual diff of images
*.png diff=diff-image
*.jpg diff=diff-image
*.jpeg diff=diff-image
*.gif diff=diff-image
@jdudek
jdudek / links.md
Last active November 24, 2015 23:36
Introduction to Elm @ React.js Meetup, Wrocław, 2015-11-24
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Clipboard example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.5/clipboard.min.js"></script>
</head>
<body>
Install with:
<input type="text" value="elm package install evancz/elm-http 2.0.0" id="install-command" />
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Clipboard example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.5/clipboard.min.js"></script>
</head>
<body>
Install with:
<input type="text" value="elm package install evancz/elm-http 2.0.0" id="install-command" />
~/tmp/git-example (master) $ git log
fc8f07f 2014-06-25 15:25:14 +0200 | A (HEAD, master) [Jan Dudek]
530ef46 2014-06-25 15:08:41 +0200 | initial commit [Jan Dudek]
~/tmp/git-example (master) $ git log b
86c2a22 2014-06-25 15:25:49 +0200 | B (b) [Jan Dudek]
530ef46 2014-06-25 15:08:41 +0200 | initial commit [Jan Dudek]
~/tmp/git-example (master) $ git log c
773f7a1 2014-06-25 15:26:13 +0200 | C (c) [Jan Dudek]
var map = function (fn) { return function (arr) { return jQuery.map(arr, fn); } };
var each = function (fn) { return function (arr) { jQuery.each(arr, fn); } };
loadReplies: function() {
var _this = this, request;
request = jQuery.getJSON('/posts/' + this.get('id') + '/replies')
.then(map(Discourse.Post.create))
.then(each(function (post) { post.set('topic', _this.get('topic'); }))
@jdudek
jdudek / robot.js
Created December 6, 2012 13:26
Johnny
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
def m1
/(a)/.match("abc")
p $1
m2()
p $1
end
def m2
/(b)/.match("abc")
p $1
@jdudek
jdudek / avl.c
Created April 2, 2012 20:06
AVL trees
#include <stdio.h>
#include <stdlib.h>
#define AVL_AS_LIST
typedef int AvlKey;
struct AvlNode {
AvlKey key;
char balance;