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

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
jakub-g / _1_"script async defer" blocks "load" event.md
Last active Sep 13, 2019
Beware of "script async defer" blocking HTML "load" event
View _1_"script async defer" blocks "load" event.md

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

TL;DR

View avl.c
#include <stdio.h>
#include <stdlib.h>
#define AVL_AS_LIST
typedef int AvlKey;
struct AvlNode {
AvlKey key;
char balance;
@jdudek
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))
else
@jdudek
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)
@seconds--
if @seconds >= 0
@jdudek
jdudek / testing-rich-client-v2-pub.coffee
Created Nov 24, 2011
A few thoughts on testing rich-client applications (meet.js)
View testing-rich-client-v2-pub.coffee
# 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.
View game_screen_controller_spec.js.coffee
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, ->
You can’t perform that action at this time.