Skip to content

Instantly share code, notes, and snippets.

View marknotton's full-sized avatar

Mark Notton marknotton

View GitHub Profile
@bendc
bendc / supportsES6.js
Created August 25, 2016 08:05
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
@craigdmckenna
craigdmckenna / gulpfile.js
Last active June 28, 2020 21:09
Create Multiple JavaScript Bundles with rollup and gulp
const gulp = require('gulp')
const gutil = require('gulp-util')
const rollup = require('./rollup')
const jsModules = [
{
entry: 'src/js/main.js',
dest: 'dist/js/main.min.js'
},
{
@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active May 12, 2025 16:53
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ