Skip to content

Instantly share code, notes, and snippets.

@jpswade
jpswade / 2022-09-06-engineering-blogs.md
Last active February 26, 2024 19:47
Engineering Blogs
title published description tags cover_image
Engineering Blogs
true
engineering, learning

I'm always interested in learning, especially around my roles in engineering and leadership.

@jpswade
jpswade / scratch_1.php
Created November 20, 2022 10:07
How to get the full SQL query with bindings using Laravel Eloquent
<?php
/** How to get the full SQL query with bindings using Laravel Eloquent **/
dd(vsprintf(str_replace('?', '\'%s\'', str_replace('%', '%%', $query->toSql())), $query->getBindings()));
@jpswade
jpswade / pipeline_duration.py
Last active September 9, 2022 09:50
Pipeline Duration
#!/bin/python
#aws codepipeline list-pipeline-executions --pipeline-name spectre-prod>codepipeline.json
import json
import sys
import dateutil.parser as parser
import datetime
data = json.load(sys.stdin)
total = 0
count = 0
@jpswade
jpswade / laravel-best-practices.md
Created August 17, 2022 15:54
Laravel Best Practices

Laravel Best Practices

These are best practices, rather than coding standards.

Coding Standards should be guidelines that we should be aiming to stick to, relating to the way code is written and its readability.

Coding standards can be and should be defined by automation tools, such as phpCS and StyleCI.

Best Practices, however, are recommendations that may help with security, performance, or architectural patterns that are solutions to a commonly occurring problems.

@jpswade
jpswade / books.md
Created May 16, 2022 14:38
Books about Nodejs, Angular2, Agile, Clean Code, Docker, Golang, Microservices, REST, TDD, BDD, and Startups.

Books

Books about Nodejs, Angular2, Agile, Clean Code, Docker, Golang, Microservices, REST, TDD, BDD, and Startups.

topic book
agile-software-development Jenkins the definitive guide
agile-software-development Continuous Delivery
agile-software-development Agile Estimating and Planning
agile-software-development Art of Agile Development
@jpswade
jpswade / SqliteTrait.php
Created August 1, 2021 10:35
Laravel - no such function: CONCAT sqlite
<?php
namespace App\Traits;
use Illuminate\Database\SQLiteConnection;
use Illuminate\Support\Facades\DB;
trait SqliteTrait
{
protected static function setUpSqlite(): void
#!/usr/local/bin/perl
use warnings; use strict;
our $debug = 0;
our $writeml = 0;
#######################################################
#
# eTicket, Open Source Support Ticket System
# http://eticket.sourceforge.net/
#
# Released under the GNU General Public License
TLD Name Registration and Renewal Price Change Ownership Price Restoration Price Transfer Price Transfer Term
ac $48.00 $48.00 $48.00 $0.00 No change
academy $12.00 $0.00 $83.00 $12.00 Renewed with transfer
accountants $94.00 $0.00 $145.00 $94.00 Renewed with transfer
adult $100.00 $0.00 $160.00 $100.00 Renewed with transfer
agency $19.00 $0.00 $73.00 $19.00 Renewed with transfer
apartments $47.00 $0.00 $100.00 $47.00 Renewed with transfer
associates $29.00 $0.00 $83.00 $29.00 Renewed with transfer
auction $29.00 $0.00 $83.00 $29.00 Renewed with transfer
audio $13.00* $0.00 Not supported Not supported Not supported
@jpswade
jpswade / php7.4-fpm-alpine
Last active September 9, 2023 20:43
PHP 7.4 PHP-FPM Alpine with core extensions gd
FROM php:7.4-fpm-alpine
# @see https://hub.docker.com/r/jpswade/php7.4-fpm-alpine
MAINTAINER Agent Software <dev@agentsoftware.net>
# Install gd, iconv, mbstring, mysql, soap, sockets, zip, and zlib extensions
# see example at https://hub.docker.com/_/php/
RUN apk add --update \
$PHPIZE_DEPS \
freetype-dev \
git \
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class DatabaseCreateCommand extends Command
{
/**