Skip to content

Instantly share code, notes, and snippets.

<html lang="en-FI" style="transition-property: none; margin-right: 0px;"><head><style>body {transition: opacity ease-in 0.2s; }
body[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; }
</style>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16">
<style id="ReanimatedPredefinedWebAnimationsStyle"></style><style id="ReanimatedCustomWebAnimationsStyle"></style></head>
[
{
"domain": ".you.com",
"expirationDate": 1773105738.08462,
"hostOnly": false,
"httpOnly": true,
"name": "FPID",
"path": "/",
"sameSite": null,
"secure": true,
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"login": true,
"siteOptions": {
"blogname": "Accessibility Enhancer"
},
"plugins": ["https://github.com/shayanabbas/accessibility-enhancer/releases/download/v1.0.0/accessibility-enhancer.zip"],
"steps": [
{
"step": "importWxr",

Project Documentation for BiasPay Integration with OlympusLabs.uk

Project Overview

The goal of this project is to enable the OlympusLabs.uk WooCommerce-based store to utilize the BiasPay payment gateway, which is registered for the Shopify-based Olympus-Labs.com domain. To achieve this, we will develop:

  1. A WooCommerce plugin to integrate BiasPay with OlympusLabs.uk.
  2. A Proxy API hosted on a subdomain (pay.olympus-labs.com) to securely mediate communication between the WooCommerce plugin and the BiasPay API.
import 'package:flutter/material.dart';
import 'package:shop_flutter_app/global_variables.dart';
import 'package:shop_flutter_app/widgets/product_card.dart';
import 'package:shop_flutter_app/pages/product_details_page.dart';
class ProductList extends StatefulWidget {
const ProductList({super.key});
@override
State<ProductList> createState() => _ProductListState();
@shayanabbas
shayanabbas / Import product to Shopify store using POST request to its API.md
Created January 11, 2024 22:07
Import product to Shopify store using POST request to its API

Posting product details to a Shopify store to create new products can be done using Shopify's API. As of 2023, Shopify provides a comprehensive API that allows you to interact with your store programmatically. Here's a step-by-step guide on how to do this:

Set Up a Shopify Private App:

Log in to your Shopify admin panel. Go to "Apps" and then choose "Manage private apps" (or similar, depending on the current Shopify layout). Create a new private app to obtain API credentials (API key and password) which are required for authentication.

Authentication:

@shayanabbas
shayanabbas / Import Products to WooCommerce using WordPress REST API.md
Created January 11, 2024 22:01
Import Products to WooCommerce using WordPress REST API

You can use the built-in WordPress REST API to import products into WooCommerce. WooCommerce extends the WordPress REST API with its own specific endpoints, allowing you to create, read, update, and delete products programmatically. Here's how you can do this:

Enable the WordPress REST API: Ensure that the WordPress REST API is enabled on your site. It is enabled by default in recent WordPress versions.

Authentication: To use the REST API, especially for writing data such as importing products, you'll need to authenticate. You can use one of the following methods:

Basic Authentication: This is simpler for development purposes but not recommended for production due to security concerns unless used over HTTPS. OAuth Authentication: More secure and suitable for production environments. Understand WooCommerce REST API Endpoints: WooCommerce adds several endpoints to the WordPress REST API for handling products. The endpoint for products typically looks like this: /wp-json/wc/v3/products.

@shayanabbas
shayanabbas / Extracting data from the Matomo Tracking API, processing it, translating it to a CSV file, and sending it daily via email.js
Created June 22, 2023 11:19
Make sure to replace the placeholders 'YOUR_MATOMO_SERVER', 'YOUR_SITE_ID', 'YOUR_AUTH_TOKEN', '[email protected]', '[email protected]', 'your_smtp_host', 'your_smtp_username', and 'your_smtp_password' with the actual values specific to your setup.
const fs = require('fs');
const request = require('request');
const csvWriter = require('csv-writer').createObjectCsvWriter;
const nodemailer = require('nodemailer');
// Matomo API endpoint and parameters
const apiUrl = 'https://your-matomo-server.com/matomo.php';
const siteId = 'YOUR_SITE_ID';
const tokenAuth = 'YOUR_AUTH_TOKEN';
const dateRange = 'previous30'; // Adjust the date range as needed
@shayanabbas
shayanabbas / How to Rename and Migrate WordPress Taxonomies Using WP-CLI
Last active June 15, 2023 13:29
The script provided below is a WP-CLI command script that renames the 'industry' taxonomy to 'segment' and migrates all terms and associated posts.
In our example, we're migrating the taxonomy 'industry' to a new taxonomy called 'segment'. Both these taxonomies are related to a custom post type 'case'.