Skip to content

Instantly share code, notes, and snippets.

View alexanderytaylor's full-sized avatar

Alexander Taylor alexanderytaylor

View GitHub Profile
@alexanderytaylor
alexanderytaylor / main.dart
Last active April 30, 2021 22:56
DropDownMenuItem seems to be constrained to the width of the DropDownButton
import 'package:flutter/material.dart';
final Color darkBlue = Color(0xFFFFFFF);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@alexanderytaylor
alexanderytaylor / theme.omp.json
Created June 27, 2023 00:40
Oh-My-Posh Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}",
"palette": {
"git-foreground": "#193549",
"git": "#FFFB38",
"git-modified": "#FF9248",
"git-diverged": "#FF4500",
"git-ahead": "#B388FF",
"git-behind": "#B388FF",
DECLARE @cmd NVARCHAR(1000),
@BasePath NVARCHAR(255) = N'C:\ProgramData\Alterity\Acctivate\Log\WebStore\',
@DateFolder NVARCHAR(10) = CONVERT(NVARCHAR(10), GETDATE(), 120), -- yyyy-MM-dd
@Results TABLE (Result NVARCHAR(255)),
@LatestSyncTime NVARCHAR(255),
@LatestSyncDateTime DATETIME,
@SyncStatus BIT
-- Construct the command to list the log directories for today's date
-- where 'DIR /A:D /B /O-D ' + @DateFolder: Lists all directories (/A:D) in bare format (/B), sorted by date in descending order (/O-D),
@alexanderytaylor
alexanderytaylor / pixel.js
Created March 27, 2024 21:16
shopify-posthog-custom-web-pixel
const postHogApiKey = "POSTHOG_API_KEY";
const postHogEndpoint = "https://app.posthog.com/capture";
const headers = {
"Content-Type": "application/json",
};
// Customer information
const customer = init.data.customer;
const { id, email, firstName, lastName } = customer;
const fullName = `${firstName} ${lastName}`;
{
"adult": false,
"backdrop_path": "/x2RS3uTcsJJ9IfjNPcgDmukoEcQ.jpg",
"belongs_to_collection": {
"id": 119,
"name": "The Lord of the Rings Collection",
"poster_path": "/oENY593nKRVL2PnxXsMtlh8izb4.jpg",
"backdrop_path": "/bccR2CGTWVVSZAG0yqmy3DIvhTX.jpg"
},
"budget": 93000000,