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
alekseykulikov /
Last active Feb 20, 2019
SUIT CSS naming convention for React.js application

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

jakub-g / _1_"script async defer" blocks "load"
Last active Sep 13, 2019
Beware of "script async defer" blocking HTML "load" event
View _1_"script async defer" blocks "load"

Beware of <script async defer> blocking HTML "load" event

2015.10.07 t

On the importance of simulated latency testing, and bulletproofing your page from the third-party JS load failures


View avl.c
#include <stdio.h>
#include <stdlib.h>
#define AVL_AS_LIST
typedef int AvlKey;
struct AvlNode {
AvlKey key;
char balance;
jdudek / gist:2136360
Created Mar 20, 2012
Jasmine: suite [] instead of nested describe
View gist:2136360
# suite ["shooter", "acceptance"], -> ...
# is equivalent to:
# describe "shooter", ->
# describe "acceptance", -> ...
window.suite = (names, block) ->
name = names.shift()
if names.length > 0
describe(name, -> suite(names, block))
jdudek / gist:1539919
Created Dec 30, 2011
Clock in JS tests
View gist:1539919
class Countdown
constructor: (@clock, @seconds) ->
$.extend(this, new Observable)
@finished = false
start: =>
fn = =>
this.trigger("updated", @seconds)
if @seconds >= 0
jdudek /
Created Nov 24, 2011
A few thoughts on testing rich-client applications (meet.js)
# A few thoughts on testing rich-client applications
# Jan Dudek, Arkency
# We've created a game that has some animations, uses Facebook API. Almost no rendering on the server. Client-server communication through JSON REST API.
test = (suite) ->
self = {}
steps = []
last = null
run = (suite, steps) ->
return if steps.length == 0
[step, msg, fn] = steps.shift()
if step == describe suite, msg, ->
You can’t perform that action at this time.