Skip to content

Instantly share code, notes, and snippets.

@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@eteeselink
eteeselink / delay.js
Created November 13, 2015 13:55
ES7 async/await version of setTimeout
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
async function something() {
console.log("this might take some time....");
await delay(5000);
console.log("done!")
}
something();
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 26, 2024 17:24 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@Zemnmez
Zemnmez / authy_extract.md
Last active December 18, 2022 17:49 — forked from tresni/gist:83b9181588c7393f6853
Authy OTP 2FA Extractor (authy to 1password, google authenticator etc)

Authy OTP 2FA Extractor

Inspired by the original gist.

This snippet will extract all the OTP (2FA) keys from Authy, and convert them to scannable QR codes and URLs you can copy-paste into e.g. 1password. Unlike other approaches, this consumes the internal digits record, making it compatible with authy-specific extra long 2FA codes.

Usage

  1. Install the Authy Chrome Extension and the Authy App.
  2. Open the authy app from the browser icon in the top right, and view some TOTP codes. This decrypts them so we can extract them.
  3. Visit the Chrome Inspector Page (chrome://inspect/#apps) and click 'inspect' under 'Authy'. If that's not there, you likely need to open the Authy app from chrome://apps/.
  4. In the window
@TheDevMinerTV
TheDevMinerTV / Skins.json
Last active July 19, 2024 08:35
Rust skins automatically updated!
{
"Command": "skin",
"Skins": [
{
"Item Shortname": "fun.guitar",
"Skins": [
0,
809801196,
826914904,
809938266,
@mss
mss / ifupdown-to-netplan.txt
Last active July 16, 2024 03:27
Migrate from ifupdown to netplan
# Tested on an upgraded Ubuntu 20.04
apt install netplan.io
systemctl unmask systemd-networkd.service
systemctl unmask systemd-resolved.service
ENABLE_TEST_COMMANDS=1 netplan migrate
netplan try
reboot
apt purge ifupdown resolvconf
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
@bompus
bompus / ..install.txt
Last active October 30, 2021 18:06
bash local aliases / per-directory aliases in bash
// download .bash_local_aliases file and cd to the download directory
$ cp .bash_local_aliases ~/
$ if ! grep -qF 'source ~/.bash_local_aliases' ~/.bashrc; then echo -e "\nsource ~/.bash_local_aliases" >> ~/.bashrc; fi
$ source ~/.bash_local_aliases && cd .
// place a .aliases file anywhere, in the space-delimited "alias command" format shown in the .aliases example in this gist
// IMPORTANT: .aliases file should end with a single blank, empty line
$ cd .
@bompus
bompus / vite.config.js
Last active July 16, 2024 19:20
silence dart-sass / npm sass DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
// silence dart-sass / npm sass DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
const silenceSomeSassDeprecationWarnings = {
verbose: true,
logger: {
warn(message, options) {
const { stderr } = process;
const span = options.span ?? undefined;
const stack = (options.stack === 'null' ? undefined : options.stack) ?? undefined;
@johnspurlock-skymethod
johnspurlock-skymethod / r2-notes.md
Last active March 13, 2024 17:32
Unofficial R2 notes
// see https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a<h;a++){s=i[a];for(n in s)t&&!r.call(s,n)||(e[n]=s[n])}}function n(){}var s=function(){},r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,a=e;n.class_="Nevis",n.super_=Object,n.extend=a;var h=n,f=h.extend(function(t,e,i){this.qrious=t,this.element=e,this.element.qrious=t,this.enabled=Boolean(i)},{draw:f