Skip to content

Instantly share code, notes, and snippets.

View nexxai's full-sized avatar

JT Smith nexxai

View GitHub Profile
@nexxai
nexxai / AWSRekognition.php
Last active April 29, 2024 19:01
A PHP class that will allow you to determine how many people are in a photo and if the photo contains inappropriate content, using AWS Rekognition
<?php
namespace App\Rekognition;
use Aws\Rekognition\RekognitionClient;
use Aws\Result;
class Client
{
public RekognitionClient $client;
@nexxai
nexxai / astronew.sh
Last active September 12, 2023 00:46
ZSH shell script function to create a new Astro website with tailwind, netlify and alpine.js already installed
function astronew() {
bunx create-astro@latest ./
bunx astro add tailwind --yes
bunx astro add netlify --yes
bunx astro add alpinejs --yes
code .
}
@nexxai
nexxai / .github-actions.yml
Created April 29, 2022 20:48
Laravel - Full Github Action with CodeCov integration and security checker
name: Deployment
on:
push:
branches: [ dev ]
pull_request:
branches: [ master ]
workflow_dispatch:
@nexxai
nexxai / yarn_run_if_new_assets.sh
Last active June 28, 2020 21:46
Laravel - only 'yarn run production' if JS/CSS assets were changed in the last git commit
# Dump the list of filenames changed in the last git commit
git diff --name-only HEAD HEAD~1 > /tmp/gitdiff.txt
# Default to no changes
yarn=false
# Read the /tmp/gitdiff.txt file line by line....
while read line; do
# The regex to search for CSS/JS/Vue/.lock/JSON files
positiveMatch='^(resources\/|).*(css|js|vue|lock|json)$'
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@Symfony' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,

Keybase proof

I hereby claim:

  • I am nexxai on github.
  • I am nexxai (https://keybase.io/nexxai) on keybase.
  • I have a public key ASBcrgP2NUdvdV9ABBuCpaXdi0320cJyqn9pknCHGFIftAo

To claim this, I am signing this object: