Skip to content

Instantly share code, notes, and snippets.

View nesterone's full-sized avatar

Igor Nesterenko nesterone

  • Globallogic
  • Kharkiv
View GitHub Profile
@rgrove
rgrove / parseJson.js
Created February 10, 2019 01:37
ECMA-404 compliant JSON parser in pure JS
/**
This is an ECMA-404 compliant JSON parser written in pure JS, with nice error
reporting. It's not super useful since it's ridiculously slow compared to
`JSON.parse()`, but I had fun writing it.
ISC License
Copyright (c) 2019 Ryan Grove <ryan@wonko.com>
Permission to use, copy, modify, and/or distribute this software for any purpose
@LimarenkoDenis
LimarenkoDenis / 0 - About Lector
Last active March 11, 2020 21:23
Programm, homeworks, final project
[Lector Profile!](https://www.linkedin.com/in/limarenkodenis)
@ptrj
ptrj / tmux-docker.md
Created October 5, 2018 15:34
tmux in demonized docker container

tmux in demonized docker container

Dockerfile

FROM ubuntu:16.04

ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm
RUN dpkg --add-architecture i386 && \
    apt-get update -y && \
@TheLarkInn
TheLarkInn / grouce-webpack-all-orgs-all-repos.bash
Last active January 4, 2020 06:57
This bash script creates a gource video. Requires gource and libav (can install with brew).
#!/bin/bash
ARRAY=(
"webpack:webpack"
"webpack:example-app"
"webpack:enhanced-require"
"webpack:webpack-dev-middleware"
"webpack:enhanced-resolve"
"webpack:template"
"webpack:webpack-dev-server"
@juanmaguitar
juanmaguitar / callback-promises-generators-async.js
Last active June 20, 2018 10:22
callbacks vs promises vs generators vs async
// https://medium.com/@rdsubhas/es6-from-callbacks-to-promises-to-generators-87f1c0cd8f2e#.q7boouq4o
/* Step 1: Callback hell — N levels deep */
var request = require('request');
var url1='http://httpbin.org/', url2=url1, url3=url1, url4=url1;
function foo(finalCallback) {
request.get(url1, function(err1, res1) {
if (err1) { return finalCallback(err1); }
@nolanlawson
nolanlawson / why_we_dropped_lerna_from_pouchdb.md
Last active December 13, 2023 10:56
Why we dropped Lerna from PouchDB

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).

Backstory:

@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
 ) AS F
@domenic
domenic / 0-usage.js
Last active August 21, 2023 09:02
Import module function (assuming <script type="module"> is implemented)
// Dynamic module loading using runtime-composed strings, decisions, etc.
for (const m of ["cool", "awesome", "fun", "whee"]) {
if (Math.random() > 0.5) {
importModule(`/js/${m}.js`).then(
module => console.log("Module instance object for " + m, module),
e => console.error(e)
);
}
}
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@johan
johan / JSXTransformer.min.js
Last active August 8, 2023 22:57
Week Calendar of Life
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){"use strict";var ReactTools=_dereq_("../main");var inlineSourceMap=_dereq_("./inline-source-map");var headEl;var dummyAnchor;var inlineScriptCount=0;var supportsAccessors=Obj