This article walks you through how to get the ID of any YouTube video.
You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v=
URL parameter.
<?php | |
/** | |
* 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. | |
* |
// How to use: | |
// 1. In VS Code, perform a search. | |
// 2. Click "Open in editor" to open the search results in a `.code-search` file | |
// 3. Save the file | |
// 4. In terminal, run `node export-vscode-search-to-csv.js path/to/results.code-search path/to/exported.csv` | |
const fs = require("fs"); | |
const path = require("path"); | |
const readline = require("readline"); |
This article walks you through how to get the ID of any YouTube video.
You may be watching the video or just happened to visit a link to a video. The video ID will be located in the URL of the video page, right after the v=
URL parameter.
Basic HTTP Authentication is when a user is required to log in to access a directory. This isn't meant to be secure by any means, but it's useful for locking out a majority of users from accessing a folder (e.g. staging a website).
To start, you must add this into your .htaccess:
AuthUserFile "/var/www/full/path/to/your/folder/.htpasswd"
AuthName "Message to go on user's login screen"
AuthType Basic
Allow from all
Require valid-user
Options +Indexes
Source mapping is a technique that "maps" your browser inspector's line numbers to the source file. This is useful when working with assets that are compiled from LESS, SASS, Coffeescript and so on. Source maps can also be used with minified assets that would normally have their line numbers removed. If you're curious, here's some more information regarding source maps.
import fs from "node:fs/promises"; | |
const camelize = (s) => s.replace(/-./g, (x) => x[1].toUpperCase()); | |
const getPathsFromSvg = async (path) => { | |
const svg = await fs.readFile(path, { encoding: "utf-8" }); | |
const paths = svg.match(/d="(.*?)"/); | |
if (!paths) { | |
throw new Error(`No paths in file ${path}`); |
// The script below will ensure that gclid parameters are associated with | |
// contacts in HubSpot. | |
// | |
// A few things are required before this script will work: | |
// | |
// * You will need to have the HubSpot tracking code installed on the page. A | |
// few modifications will be required if you don't have the tracking code | |
// installed. Additionally, you will lose out on the built-in cross-domain | |
// features that the hubspot tracking code uses to store cookies. | |
// * You will need to have this script installed on every page. |
/* | |
* Placeholder plugin for jQuery | |
* @author Daniel Stocks (http://webcloud.se) | |
*/ | |
(function($) { | |
function Placeholder(input) { | |
this.input = input; | |
if (input.attr('type') == 'password') { | |
this.handlePassword(); | |
} |