Skip to content

Instantly share code, notes, and snippets.

View titanism's full-sized avatar

titanism

View GitHub Profile
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active May 17, 2024 05:13
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

@loretoparisi
loretoparisi / english_contractions_dataset.js
Last active June 13, 2022 12:20
List of English contractions from Wikipedia
script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);
function download(name,jsonObject) {
var fileContents = JSON.stringify(jsonObject, null, 2);
var pp = document.createElement('a');
pp.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(fileContents));
pp.setAttribute('download', name+'.json');
pp.click();
}
df={}
$( $('.wikitable')[0] ).find('tr').each((index,item) => {
01000011x10001000x000100000100x010000010010
ShellScript
https://www.shellscript.sh/
Acl
http://www.gsp.com/cgi-bin/mdroid.cgi?topic=extattrctl
http://www.onlamp.com/pub/a/bsd/2003/08/14/freebsd_acls.html
https://linux.die.net/man/1/setfacl
https://www.bing.com/search?q=ACLs+with+Samba+andWindows&src=IE-TopResult&FORM=IETR02&conversationid=
https://en.wikipedia.org/wiki/Chmod
@ratacibernetica
ratacibernetica / tether.md
Created April 25, 2019 15:24
Bypass Hotspot Tethering Limit by using the phone's unlimited plan

You could make your phone to act as a VPN Gateway

Requirements:

  • root
  • vpn server (can obtain any free openVPN from playstore)
  • Using a VPN gateway will make tethered traffic to go through the VPN.

Steps

@kafene
kafene / gpg-wkd.md
Last active April 12, 2024 19:14
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@sj26
sj26 / LICENSE.md
Last active March 8, 2024 18:31
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit