Skip to content

Instantly share code, notes, and snippets.

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

Chase Pierce syntaqx

🤷
¯\_(ツ)_/¯
View GitHub Profile
@syntaqx
syntaqx / create-secret.sh
Created July 2, 2024 20:00
Script to create secrets on my personal API
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 <secret_value>"
exit 1
}
# Check if a secret value is provided
if [ -z "$1" ]; then
@syntaqx
syntaqx / Dockerfile
Last active June 18, 2024 03:43
Simple Node Docker w/ Compose
FROM node:latest
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
@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', '[email protected]', 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
{