Skip to content

Instantly share code, notes, and snippets.

View OsamaAbbas's full-sized avatar
🤬

Osama Abbas OsamaAbbas

🤬
  • Pyeongtaek, South Korea
View GitHub Profile
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active April 26, 2024 13:33
ES Modules are terrible, actually

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

@rmi1974
rmi1974 / libfaketime_usage.md
Last active December 27, 2023 18:05
Using libfaketime to manipulate the system time for applications #faketime #wine #debug #commandlinefu

Using libfaketime to manipulate the system time for applications

See [libfaketime on github][1] for upstream project site general overview.

Build in multilib environment

#!/usr/bin/env bash

set -Eeuo pipefail
@patrick-steele-idem
patrick-steele-idem / README.md
Last active May 10, 2021 03:52
Syntax: Marko vs Vue

Syntax: Marko vs Vue

Custom tags and passing data

Marko:

<greeting
  name=fullName
  message-count=30
@cmalven
cmalven / cooking-ratios.md
Created January 6, 2015 00:42
Cooking Ratios

Cooking Ratios

All ratios should be measure by weight using a kitchen scale.

Doughs

  • Bread = 5 parts flour : 3 parts water (plus yeast and salt)
  • Pasta Dough = 3 parts flour : 2 parts egg
  • Pie Dough = 3 parts flour : 2 parts fat : 1 part water
  • Biscuit = 3 parts flour : 1 part fat : 2 parts liquid
@victorquinn
victorquinn / promise_while_loop.js
Last active March 30, 2023 04:29
Promise "loop" using the Bluebird library
var Promise = require('bluebird');
var promiseWhile = function(condition, action) {
var resolver = Promise.defer();
var loop = function() {
if (!condition()) return resolver.resolve();
return Promise.cast(action())
.then(loop)
.catch(resolver.reject);
@thoward
thoward / MultiTokenStreamExample.Program.cs
Created December 17, 2010 03:33
An example of how to do something like Solr's copy fields in a Lucene Index...
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.QueryParsers;