Skip to content

Instantly share code, notes, and snippets.

View SapioBeasley's full-sized avatar
🕳️

Andreas Beasley SapioBeasley

🕳️
View GitHub Profile

Artworks Importer

This script imports and processes artworks into Square Catalog, including image upscaling and attribute management.

Prerequisites

  • Node.js (v14 or later)
  • NPM (v6 or later)
  • Access to Square API
  • AWS credentials for image storage
this.app.post('', jsonParser, async (req: Request, res: Response) => {
try {
const stage = 'AlignersShipped';
const { fields: { summary: patientNumber } } = req.body;
const opportunities = await findOpportunityByPatientNumber(conn, patientNumber);
if (opportunities.length > 1) {
Date Open High Low Close Adj Close Volume
2019-03-12 180.000000 182.669998 179.369995 180.910004 178.572662 32467600
2019-03-13 182.250000 183.300003 180.919998 181.710007 179.362320 31032500
2019-03-14 183.899994 184.100006 182.559998 183.729996 181.356216 23579500
2019-03-15 184.850006 187.330002 183.740005 186.119995 183.715332 39042900
2019-03-18 185.800003 188.389999 185.789993 188.020004 185.590805 26219800
2019-03-19 188.350006 188.990005 185.919998 186.529999 184.120056 31646400
2019-03-20 186.229996 189.490005 184.729996 188.160004 185.728989 31035200
2019-03-21 190.020004 196.330002 189.809998 195.089996 192.569427 51034200
2019-03-22 195.339996 197.690002 190.779999 191.050003 188.581650 42407700
@SapioBeasley
SapioBeasley / stripeFunctionality.md
Last active April 14, 2017 03:34
Stripe Functionality

Core Resources

Balance

Retrieve balance
Retrieve a balance transaction
List all balance history

Charges

Create a charge
Retrieve a charge

@SapioBeasley
SapioBeasley / extendingNgMessages.md
Last active August 6, 2017 17:26
Extend ngMessages

Creating a registration form earlier today and realized angular did not come packaged with password confirm directives for ngMessages. So I needed to create one.

First things first, attach your new directive into your module.

// Creating a new directive
(function ()
{
  'use strict';
  
@SapioBeasley
SapioBeasley / queueFinding.md
Last active August 6, 2017 17:24
Redis Queues Saves

Wanted to chime in today with some case studies I’ve ran on my end and share the finding Hopefully someone will find some value to it. @everyone

Issue:

Previously I’ve brought up a client of mine where I was using elastic search as well and direct rets real estate data. Elastic search itself as the search engine has indeed reduced the amount of resources each DB call would have taken up for the front end. The next spike to tackle were those on the back end. Since real estate data is big data and I do mean BIG DATA, it was no easy feat. Luckily there are tools to help.

To help alleviate my backend db writes, since I cannot omit requests, I used redis (Find more on redis here http://redis.io/) to save queued jobs that sit in redis and persist until it is able to run, as communication between programs can be independent of time. This capability also allowed for decreased wait times for processes. (ie. if I run a pull properties command in cli, I would need to wait until the process is done before closi

@SapioBeasley
SapioBeasley / 1-before.md
Last active June 10, 2016 02:00
Before and After Locu Search

Working on a project with a contract that I am with right now and I ran into this class...not really cause it really isnt a class nor function. It's almost an unusable unscalable file that has one purpose which is to apparently take up space for a demo page. So I figured I would rewrite the entire thing to make it usable in many areas of the project. Here are the results.

<?php
/*
    http://phphttpclient.com/#install

    https://semaphoreci.com/community/tutorials/getting-started-with-composer-for-php-dependency-management
    https://github.com/fzaninotto/Faker
    http://phpenthusiast.com/blog/how-to-use-packagist-and-composer
@SapioBeasley
SapioBeasley / geocode.md
Last active March 23, 2016 18:36
Looking for advice with Geocode

I have finally found a reason to use my geocode software in a real world project. It's working as expected, but I think it could be even more usefule and powerful. Looking for any advice, tips, or features to add on.

Fork Here


geocode

Build Status Latest Stable Version

@SapioBeasley
SapioBeasley / rss2pdf.md
Last active April 1, 2025 06:02
RSS feed to PDF

rss2pdf

Simple php page where after submitting an rss feed from news.google.com it will grab the contents of the RSS and gernerate a PDF output with one article from the XML per page.

Functionality is specifically made to parse news.google.com rss, but other rss feeds may be input as well. Other inputs will only display the description and no other data without further edits.

Demo

Input rss/xml feed you would like to have parsed submit it. You will see a notice to view your pdf submission. Click to view. An example url that you can use is http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss.

Run a live demo: http://sapioweb.com/rss2pdf

@SapioBeasley
SapioBeasley / 1_phpunit-api.md
Last active March 12, 2016 20:31 — forked from loonies/1_phpunit-api.md
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()