Skip to content

Instantly share code, notes, and snippets.


Kahlil Lechelt kahlil

View GitHub Profile
kahlil / microblog-import.js
Last active Jan 1, 2019 import script
View microblog-import.js
const fs = require('fs');
const { promisify } = require('util');
const matter = require('gray-matter');
const got = require('got');
const queryString = require('query-string');
const readFile = promisify(fs.readFile);
const readDir = promisify(fs.readdir);
(async () => {

Keybase proof

I hereby claim:

  • I am kahlil on github.
  • I am 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 / index.js
Last active Sep 1, 2016
requirebin sketch
View index.js
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>
kahlil / JavaScript
Last active Mar 25, 2016
A simple package.json to quickstart and build out any JavaScript project.
View JavaScript

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.

View Stores in Flux with Rx.js
import ACTION_CONSTANTS from '../../constant/action-constants';
import Rx from 'rx';
class SomeStore {
constructor(dispatcher) {
this.dispatcher = dispatcher;
this.someState = false;
this.subject = new Rx.ReplaySubject(1);
View Stores in Flux with Rx refactored.js
import ACTION_CONSTANTS from '../../constant/action-constants';
import Rx from 'rx';
class SomeStore {
constructor(dispatcher) {
this.dispatcher = dispatcher;
this.someStore$ = this.registerActionHandlers();
kahlil / dabblet.css
Created Dec 25, 2015
The first commented line is your dabblet’s title
View dabblet.css
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
kahlil / create-from-array.js
Created Dec 8, 2015
Observables Basics: Events are basically collections over time.
View create-from-array.js
const coordinates = Rx.Observable.from([
{ x: 12, y: 32 },
{ x: 45, y: 62 },
{ x: 22, y: 33 }
kahlil / cycle-storage-driver.js
Last active Nov 19, 2015
How to use @cycle/storage.
View cycle-storage-driver.js
// Import Cycle core, the dom driver and the storage driver.
import Cycle from '@cycle/core';
import storageDriver from '@cycle/storage';
import { makeDOMDriver, h } from '@cycle/dom';
function main({DOM, storage}) {
// Create a stream of storage requests:
// 1. we select the desired input field
const storageRequest$ ='input')
// 2. We listen to the keypress events.

guys, dudes, bros

I think you mean team...

I think you mean squad..

I think you mean gang...

I think you mean pals...