Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / esm-package.md
Last active June 29, 2024 11:18
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){
@darinalleman
darinalleman / Code.gs
Last active March 30, 2024 20:29
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 June 18, 2024 14:38
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 March 4, 2024 10:47
[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 June 28, 2024 23:46
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 1, 2023 05:38
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.

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started