Skip to content

Instantly share code, notes, and snippets.

View kahlil's full-sized avatar

Kahlil Lechelt kahlil

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kahlil on github.
  • I am kahlil (https://keybase.io/kahlil) on keybase.
  • I have a public key whose fingerprint is 50A7 8150 2D49 4FA8 F5B1 068D F4F6 F1B6 7F2C F47B

To claim this, I am signing this object:

@kahlil
kahlil / index.js
Last active September 1, 2016 13:51
requirebin sketch
var React = require('react')
var render = require('react-dom').render
var hyperx = require('hyperx')
var hx = hyperx(React.createElement)
var App = React.createClass({
getInitialState: function () { return { n: 0 } },
render: function () {
return hx`<div>
<h1>clicked ${this.state.n} times</h1>

why ./task.js?

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

@kahlil
kahlil / JavaScript Quickstart.md
Last active March 25, 2016 14:42
A simple package.json to quickstart and build out any JavaScript project.

JavaScript Quickstart

If you want to quickly try out an idea use this package.json. Just npm install create an index.js file, write ES2015 code if you want and see what it does in the browser by typing npm start on the command line.

As a foundation for a build-out you have xo installed for linting and ava for testing.

import ACTION_CONSTANTS from '../../constant/action-constants';
import Rx from 'rx';
class SomeStore {
constructor(dispatcher) {
'ngInject';
this.dispatcher = dispatcher;
this.someState = false;
this.subject = new Rx.ReplaySubject(1);
import ACTION_CONSTANTS from '../../constant/action-constants';
import Rx from 'rx';
class SomeStore {
constructor(dispatcher) {
'ngInject';
this.dispatcher = dispatcher;
this.someStore$ = this.registerActionHandlers();
}
  • plugins should only do one thing and do them well. Your task shouldn't concat files that's why we have grunt-contrib-concat. Your task shouldn't minify CSS, that's what eg. grunt-csso is for.
  • don't bloat with uneeded options. pick sane defaults.
  • should be fully tested (this should be enforced! we really don't want people using untested plugins).
  • search the plugin list before creating one. what you want to create is probably already created and all you're doing is making it harder for users to find one.
  • don't use the prototyped colors properties like, ''.green. This will be deprecated in the future. Use a sane coloring lib like chalk instead.
  • readme:
    • should have a good intro
    • travis badge
    • have examples
  • describe all options with types and defaults
var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var path = require('path');
var tinylr = require('tiny-lr');
var createServers = function(port, lrport) {
var lr = tinylr();
lr.listen(lrport, function() {
gutil.log('LR Listening on', lrport);
@kahlil
kahlil / PLAYnMAKE-2013-links.md
Last active December 31, 2015 01:09
Just a link list related to the Play & Make 2013 talks and speakers. No context.

DalekJS - UI testing an der Front

Das testen von Webseiten und Webapps ist die unrühmliche Bastard unserer Zeit. Nachdem wir dieses Biest namens 'Unit testing' gezähmt haben, ist es jetzt an der Zeit, unsere Frontlinien an eine andere Front zu verlagern. Dieses Mal geht es um euer UI. Und nein, wir penetrieren nicht unseren alten Alliierten Selenium und wir kämpfen auch nicht in den Ruby Steppen von Watir, nein meine Freunde, dieses mal ist es an JavaScript unsere Bugs ein für alle mal zu besiegen.