Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / esm-package.md
Last active April 21, 2025 02:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@darinalleman
darinalleman / Code.gs
Last active May 10, 2024 16:58
Zillow Tiller Sheets Importer (With Balance History)
function writeZestimateToSheet() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheets = spreadsheet.getSheets();
var zillowSheet = sheets.find(sheet => sheet.getSheetName() == 'Zillow');
var balanceHistory = sheets.find(sheet => sheet.getSheetName() == 'Balance History');
if (zillowSheet && balanceHistory) {
var zillowIds = ['%%%%%%%%%'];
var row = [];
for (i = 0; i < zillowIds.length; i++) {
if (zillowIds[i] != undefined){
@sidward35
sidward35 / hosts
Last active April 15, 2025 14:14
Adlist for Pi-hole with domains for Roku, LG, and Samsung
# Roku block list
#----------------------------------
0.0.0.0 p.ads.roku.com
0.0.0.0 tyler.logs.roku.com
0.0.0.0 giga.logs.roku.com
0.0.0.0 cooper.logs.roku.com
0.0.0.0 cloudservices.roku.com
0.0.0.0 assets.sr.roku.com
0.0.0.0 prod.mobile.roku.com
0.0.0.0 wwwimg.roku.com
@darinalleman
darinalleman / Code.gs
Last active July 26, 2024 02:08
Google Sheets Zillow Import Script
function writeZestimateToSheet() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheets = spreadsheet.getSheets();
var zillowSheet = sheets.find(sheet => sheet.getSheetName() == 'Zillow');
if (zillowSheet) {
var html = UrlFetchApp.fetch('https://www.zillow.com/homes/%%%%%%%%%_zpid/').getContentText();
const divRegex = /(<div class="zestimate-value">)(\$)(\d{1,3})(,\d{3})*(<\/div>)/g;
const moneyRegex = /(\$)(\d{1,3})(,\d{3})*/g;
var div = html.match(divRegex);
@bryant988
bryant988 / zillow.js
Last active April 9, 2025 02:19
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.
@angorb
angorb / Bluetooth-Company-Identifiers.csv
Last active February 17, 2025 19:29
[Bluetooth Company Identifiers] Company identifiers are unique numbers assigned by the Bluetooth SIG to member companies requesting one.
0x0000 Ericsson Technology Licensing
0x0001 Nokia Mobile Phones
0x0002 Intel Corp.
0x0003 IBM Corp.
0x0004 Toshiba Corp.
0x0005 3Com
0x0006 Microsoft
0x0007 Lucent
0x0008 Motorola
0x0009 Infineon Technologies AG
@jarbro
jarbro / symantec-vip-access-totp.md
Last active April 2, 2025 07:13
Generate Symantec VIP Access Token as TOTP

Generate Symantec VIP Access Token as OTP

Recently I came across a web service that required two-factor authentication using the Symantec VIP Access App. I already manage all of my OTP tokens in a different app (If you are on iOS I highly recommend using OTP Auth by Roland Moers.) and did not want to have to use yet another app to generate the TOTP.

There is a way to generate a Symantec VIP Access compatible token very easily if you have access to an environment which can run Python PIP. I happen to have Ubuntu Windows Subsystem Linux running on my machine. (If you are running Windows 10 and don't have this you should really check it out.) Let's get started...

hello

Instructions

Here we install python3-pip and qrencode so we can generate our secret, I

@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 26, 2025 21:14
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.
@unofficialshopify
unofficialshopify / How to get a visitor’s location and redirect them to right store for Shopify
Last active December 8, 2022 05:58
How to get a visitor’s location and redirect them to right store for Shopify
These days some business have online store in different country with the same name. They have different URL for different country but they are facing a problem that how they can redirect store url based on IP address for eg.
www.domain.us – Customers in the United States
www.domain.ca – Customers in the Canada
www.domain.com – Customers in rest the world
This article guide you to do that.