Skip to content

Instantly share code, notes, and snippets.

View jdudek's full-sized avatar

Jan Dudek jdudek

View GitHub Profile
@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);
<!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" />
@jdudek
jdudek / links.md
Last active November 24, 2015 23:36
Introduction to Elm @ React.js Meetup, Wrocław, 2015-11-24
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 / convert.rb
Created January 31, 2011 19:28
Convert Opera's .adr address book to CSV
# 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|
@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 / 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 / first-f.txt
Created December 7, 2010 19:31
Random Polish names generator / Generator losowych nazwisk, lista losowych nazwisk
Anna
Maria
Katarzyna
Małgorzata
Agnieszka
Krystyna
Barbara
Ewa
Elżbieta
Zofia
@jdudek
jdudek / game_screen_controller_spec.js.coffee
Created November 5, 2011 14:44
Given/when/then in Jasmine
test = (suite) ->
self = {}
steps = []
last = null
run = (suite, steps) ->
return if steps.length == 0
[step, msg, fn] = steps.shift()
if step == describe
describe.call suite, msg, ->