Skip to content

Instantly share code, notes, and snippets.

Jan Dudek jdudek

Block or report user

Report or block jdudek

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
@jdudek
jdudek / first-f.txt
Created Dec 7, 2010
Random Polish names generator / Generator losowych nazwisk, lista losowych nazwisk
View first-f.txt
Anna
Maria
Katarzyna
Małgorzata
Agnieszka
Krystyna
Barbara
Ewa
Elżbieta
Zofia
@jdudek
jdudek / .gitattributes
Created Jul 3, 2018
Git: visual diff of images
View .gitattributes
*.png diff=diff-image
*.jpg diff=diff-image
*.jpeg diff=diff-image
*.gif diff=diff-image
@jdudek
jdudek / convert.rb
Created Jan 31, 2011
Convert Opera's .adr address book to CSV
View convert.rb
# ruby 1.9.2
require "csv"
File.open("contacts2.adr", "r") do |f|
contacts = []
f.read.split("#CONTACT").each do |entry|
unless entry.empty?
contact = {}
entry.each_line do |line|
View gist:5085515
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 / links.md
Last active Nov 24, 2015
Introduction to Elm @ React.js Meetup, Wrocław, 2015-11-24
View links.md
View index.html
<!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" />
View index.html
<!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" />
View robot.js
//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);
View gist:3347991
def m1
/(a)/.match("abc")
p $1
m2()
p $1
end
def m2
/(b)/.match("abc")
p $1
View avl.c
#include <stdio.h>
#include <stdlib.h>
#define AVL_AS_LIST
typedef int AvlKey;
struct AvlNode {
AvlKey key;
char balance;
You can’t perform that action at this time.