Skip to content

Instantly share code, notes, and snippets.

View syntaqx's full-sized avatar
🤷
¯\_(ツ)_/¯

Chase Pierce syntaqx

🤷
¯\_(ツ)_/¯
View GitHub Profile
@syntaqx
syntaqx / compose.yml
Last active February 14, 2024 20:58
DynamoDB Locally
services:
app:
image: amazon/aws-cli
ports:
- "8080"
environment:
AWS_ACCESS_KEY_ID: 'DUMMYIDEXAMPLE'
AWS_SECRET_ACCESS_KEY: 'DUMMYEXAMPLEKEY'
AWS_DEFAULT_REGION: 'us-east-1'
INSERT INTO customers (name, email, created_by)
VALUES ('John Doe', 'john.doe@example.com', ROW('namespace1', '12345'));
@syntaqx
syntaqx / urn.sql
Created November 8, 2023 20:51
URNs in Postgres
SELECT
id,
CONCAT('urn:aptive:customer:', id::text) as urn
FROM customers
LIMIT 5000
SELECT
id as id_int,
CONCAT('urn:aptive:customer:', i::text) as id_urn
FROM customers
fail_on_severity: 'low'
license-check: true
vulnerability-check: true
# You do not need Legal approval to use code licensed under these licenses, for
# any use case.
allow_licenses:
- oAFL-1.1
- oAFL-1.2
- oAFL-2.0
<?php
$unknown_format = [
'2023/05/02',
'05/02/2023',
];
foreach ($unknown_format as $fmt) {
echo date("Y-m-d", strtotime($fmt)) . PHP_EOL;
}
@syntaqx
syntaqx / pslam.yml
Last active January 27, 2023 22:54
name: Psalm Static Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
actions: read
Chase Pierce
:flag-ua: 12:38 PM
<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class TechByteTest extends TestCase
{
public function testTodaysPresentation(): void
{
@syntaqx
syntaqx / Dockerfile
Last active August 2, 2022 20:38
Node 18 Optimized Docker
FROM node:18 AS development
RUN apt-get update && apt-get install -y openssl
WORKDIR /usr/src/app
COPY --chown=node:node package.json package-lock.json ./
RUN npm ci
@syntaqx
syntaqx / Dockerfile
Created July 27, 2022 18:23
Work in PHP 7.4 easier
FROM php:7.4
RUN apt-get update && apt-get install -y git unzip
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
WORKDIR /app