Skip to content

Instantly share code, notes, and snippets.

Avatar

Vadim Demedes vadimdemedes

View GitHub Profile
View pulse.md

Pulse Support

View latest stats from Plausible Analytics right in your menu bar.

Contact

If you have any questions or suggestions regarding Pulse, do not hesitate to contact me.

@vadimdemedes
vadimdemedes / app.js
Last active Jul 10, 2020
Starter code for creating a custom React renderer
View app.js
import React from 'react';
import reconciler from './reconciler';
const App = () => {
return <h1>Hello World</h1>;
};
const render = (tree, target) => {
const container = reconciler.createContainer(target);
container.updateContainer(tree, container);
View x0.log
❯ npx x0 .
x0 @compositor/x0
x0 ⠦ starting dev server✖ 「wdm」:
ERROR in (webpack)-dev-middleware/node_modules/mime/src/test.js
Module not found: Error: Can't resolve '../node_modules/mime-types' in '/Users/X/Projects/demo/node_modules/webpack-dev-middleware/node_modules/mime/src'
@ (webpack)-dev-middleware/node_modules/mime/src/test.js 4:16-53
@ . sync \.(js|md|mdx|jsx)$
@ ./node_modules/@compositor/x0/src/entry.js
@ multi ./node_modules/@compositor/x0/src/entry
View keybase.md

Keybase proof

I hereby claim:

  • I am vadimdemedes on github.
  • I am vadimdemedes (https://keybase.io/vadimdemedes) on keybase.
  • I have a public key whose fingerprint is 5476 3A1E DB25 6FD1 8140 A088 CD44 437A 7E64 CE65

To claim this, I am signing this object:

View commit-changes.sh
$ git add cli.js
$ git commit -m 'display test execution time'
View git-clone.sh
$ git clone git@github.com:vdemedes/ava.git
$ cd ava
View keybase.md

Keybase proof

I hereby claim:

  • I am vdemedes on github.
  • I am vadimdemedes (https://keybase.io/vadimdemedes) on keybase.
  • I have a public key whose fingerprint is 5476 3A1E DB25 6FD1 8140 A088 CD44 437A 7E64 CE65

To claim this, I am signing this object:

@vadimdemedes
vadimdemedes / foo.js
Last active Feb 5, 2016 — forked from quidmonkey/foo.js
How Do I Mock the DOM with Ava?
View foo.js
import jQuery from 'jquery';
export const attachEvents = someStr => {
jQuery(document).ready(e => {
// do something cool with someStr
});
};
View collection-view.js
var TeamMemberView = Chute.View.extend({
template: _.template('<li><%= full_name %></li>'),
container: 'ul'
});
var TeamView = Chute.CollectionView.extend({
template: _.template('<ul></ul>'),
itemView: TeamMemberView
});
View events.js
var MyView = Chute.View.extend({
events: {
'click a.someButton': 'doSomething',
'click a.anotherButton': function(e){
// event fired
}
},
doSomething: function(e){
var $el = $(e.target); // getting a reference to an element, event was fired on