Find all <style> tags and their contents:
``
Image key Image Another column | |
1 =IMAGE("data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7") Random data | |
2 =IMAGE("data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7") More Random data |
Find all <style> tags and their contents:
``
The WooCommerce Wordpress plugin doesn't have a way to update all prices for all products and all variations in bulk. You have to do it by hand, in the Wordpress admin editor, or pay for a "bulk edit" plugin to do it.
Or, you can hack the database directly using some fancy SQL. It took me a while to figure this out.
-- Update all prices for all variations and products that are 4.99, change to 5.99
fun generateSequenceOfFractions( | |
range: ClosedFloatingPointRange<Float>, | |
step: Float | |
): Sequence<Float> { | |
val multiplier = 1f / step | |
val start = floor(range.start * multiplier).toInt() | |
val endInclusive = ceil(range.endInclusive * multiplier).toInt() | |
return generateSequence(start) { it + 1 } | |
.takeWhile { it <= endInclusive } | |
.map{ it.toFloat() / multiplier } |
/** Returns the first querystring parameter with the given key, or null if not found. */ | |
export function getParam(param: string): string|null { | |
var dataCallbackMatches = new RegExp(param + '=([^&]+)').exec(document.location.href); | |
if (dataCallbackMatches) { | |
return dataCallbackMatches[1]; | |
} else { | |
return null; | |
} | |
}; |
import {Deferred} from './Deferred.js'; // See https://gist.github.com/odbol/1a98cf6186caaace78cae9e7a249c992 | |
/** | |
* A PendingRequest. | |
*/ | |
export interface PendingRequest<T> { | |
/** | |
* Id of the request for resolving/rejecting later. | |
*/ | |
requestId: number; |
/** | |
* A Promise that you can resolve or reject after the fact. | |
*/ | |
export class Deferred<T> { | |
private _resolve?: (result: T) => void; | |
private _reject?: (error: Error) => void; | |
promise: Promise<T>; | |
constructor() { | |
this.promise = new Promise((resolve, reject) => { |
export type float = number; | |
/** | |
* Interpolate a value with specified extrema, to a new value between new extrema. | |
* | |
* @param value the current value | |
* @param inputMin minimum the input value can reach | |
* @param inputMax maximum the input value can reach | |
* @param outputMin minimum the output value can reach | |
* @param outputMax maximum the output value can reach |
import {promises as fs} from 'fs'; | |
import os from 'os'; | |
import { parse } from 'csv-parse/sync'; | |
/** | |
* Creates a credential provider to pass to S3Client which reads a credentials | |
* CSV downloaded from the AWS console. | |
* | |
* @param csvFile string path of the CSV file from AWS console. | |
* @returns a Provider<Credentials> to give to S3Client as the credentials option. |
I am attesting that this GitHub handle odbol is linked to the Tezos account tz1cdfM7UEtbMt6fMUyGJ4sf5UVNMHEwnEGZ for tzprofiles | |
sig:edsigtY7ADXz4xbHrP1P6pQx9fJiZ9piF9bw1fTBhVfKLT1AaZp5X6dfZSey3RirZc1NGxb3spS9eqXGKvhe7fS4zVdgwfXa5DE |