Skip to content

Instantly share code, notes, and snippets.

View jwhulette's full-sized avatar
🏠
Working from home

Wes Hulette jwhulette

🏠
Working from home
View GitHub Profile
@jwhulette
jwhulette / Vagrantfile - FreeBSD
Last active January 5, 2023 14:38
[Vagrantfile - FreeBSD] #freebsd
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@jwhulette
jwhulette / php_timezones.php
Last active November 19, 2020 03:52
[PHP Timezones] #php
/**
* Timezone calculations
*/
class Timezone
{
/**
* Timezones list with GMT offset
*
* @return array
@jwhulette
jwhulette / .htaccess
Last active July 25, 2021 23:03
[A base .htaccess with HTTPS redirect behind an AWS Load Balancer] #apache #aws
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Force HTTPS - Proto needed for AWS ELB
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTP_USER_AGENT} !^ELB-HealthChecker
@jwhulette
jwhulette / Apache_rewrite_to_Amazon_S3.txt
Last active July 25, 2021 23:03 — forked from NapoleonWils0n/Apache_rewrite_to_Amazon_S3.txt
[Apache S3 Rewrite] #apache #aws
<Directory "/www/sitename/folder/">
<IfModule mod_rewrite.c>
RewriteEngine ON
RewriteRule ^(.*) http://bucktname.s3.amazonaws.com/folder/$1
</IfModule>
</Directory>
@jwhulette
jwhulette / awslogs-agent-setup.py
Last active February 20, 2024 17:03
[FreeBSD AWS CloudWatch Logs installer] #python #aws
#!/usr/bin/python
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the License is
# located at http://aws.amazon.com/asl/ or in the "license" file accompanying
# this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
@jwhulette
jwhulette / vhost.ApacheConf
Last active April 2, 2018 18:03
[Apache Vhost] #apache
DocumentRoot /usr/local/www/apache24/data/public
ServerName vagrant.local
AccessFileName .htaccess-dev
DirectoryIndex /index.php index.php
# Defining a worker will improve performance
# And in this case, re-use the worker (dependent on support from the fcgi application)
# If you have enough idle workers, this would only improve the performance marginally
<Proxy "fcgi://localhost:9000/" enablereuse=on max=10>
</Proxy>
@jwhulette
jwhulette / aws_cloud_watch_laravel_log.txt
Last active July 25, 2021 23:04
[Cloudwatch Multiline] #aws
multi_line_start_pattern = {datetime_format}
@jwhulette
jwhulette / CronSchedule.php
Last active June 20, 2020 14:50 — forked from m4tthumphrey/CronSchedule.php
[CronSchedule] Allows one to parse a cron expression into human readable text. #php
<?php
namespace App\Models\Common;
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
@jwhulette
jwhulette / .eslintrc.js
Last active July 25, 2021 23:02
[Vue VSCode setup] #vscode #vuejs
module.exports = {
root: true,
env: {
browser: true,
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
},
extends: [
@jwhulette
jwhulette / Laravel Zero Hide Commands
Last active July 25, 2021 22:59
[Laravel Zero Hide Commands] #laravel #php
'hidden' => Phar::running() ? [
NunoMaduro\Collision\Adapters\Laravel\Commands\TestCommand::class,
NunoMaduro\LaravelConsoleSummary\SummaryCommand::class,
Symfony\Component\Console\Command\HelpCommand::class,
LaravelZero\Framework\Commands\MakeCommand::class,
LaravelZero\Framework\Commands\BuildCommand::class,
LaravelZero\Framework\Commands\InstallCommand::class,
LaravelZero\Framework\Commands\RenameCommand::class,
LaravelZero\Framework\Commands\StubPublishCommand::class,
Illuminate\Console\Scheduling\ScheduleRunCommand::class,