Skip to content

Instantly share code, notes, and snippets.

View dabernathy89's full-sized avatar

Daniel Abernathy dabernathy89

View GitHub Profile
@stefanzweifel
stefanzweifel / push.yml
Last active August 27, 2019 19:57
Example Configuration to run phpunit for a Laravel App on GitHub Actions
on: push
name: Run phpunit testsuite
jobs:
phpunit:
runs-on: ubuntu-latest
# container:
# image: lorisleiva/laravel-docker:7.3
steps:
- uses: actions/checkout@v1
@nvahalik
nvahalik / ArrayModel.php
Last active June 3, 2019 10:07
A QnD class for keeping arrays straight
<?php namespace App\Models;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Fluent;
class ArrayModel extends Fluent
{
public function __construct($data)
{
if (($validator = Validator::make($data, $this->rules()))->fails()) {
Hey y'all! Let's do a Southeast PHP Wurstcon! It's happening on Friday, after the after-party (exact time TBD).
The restaurant, Bavarian Bierhaus, is located in the mall next to the Grand Ole Opry:
https://goo.gl/maps/qnrPjuBZHXF2
Let me know if you'd like to attend or if you have thoughts on the schedule below!
@calebporzio
calebporzio / composer_versions_cheatsheet.md
Last active September 30, 2024 08:58
Composer version symbol cheatsheet
...
"require": {
    "vendor/package": "1.3.2", // exactly 1.3.2 (exact)

    // >, <, >=, <= | specify upper / lower bounds
    "vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
    "vendor/package": "<1.3.2", // anything below 1.3.2

 // * | wildcard
@ktbartholomew
ktbartholomew / any-file-in-webpack-bundle.js
Created August 10, 2016 03:22
webpack environment variable substitution
// any environment variables grabbed by the environment file and/or shell environment
// can be used as properties of process.env like so:
console.log(process.env.API_URL);
@leonardofed
leonardofed / README.md
Last active December 20, 2024 19:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@ikwattro
ikwattro / post.md
Last active December 3, 2023 05:20
Discover Graph Databases with Neo4j & PHP

Discover Graph Databases with Neo4j and PHP

Graph databases are now one of the core technologies of companies dealing with highly connected data.

Business graphs, social graphs, knowledge graphs, interest graphs and media graphs are frequently in the (technology) news. And for a reason. The graph model represents a very flexible way of handling relationships in your data. And graph databases provide fast and efficient storage, retrieval and querying for it.

Neo4j, the most popular graph database, has proven that ability to deal with massive amount of high connected data in many use-cases.

@spivurno
spivurno / gw-gravity-forms-populate-entries.php
Last active October 20, 2021 10:18
Gravity Wiz // Gravity Forms Populate With Entries
<?php
/**
* Gravity Wiz // Gravity Forms Populate With Entries
*
* Populate choice-based fields (i.e. drop downs, radios, checkboxes) with data from Gravity Form entries.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
@dabernathy89
dabernathy89 / gf_button_addclass.php
Last active December 23, 2015 07:19
Add class(es) to Gravity Forms buttons
add_filter("gform_submit_button", "alter_form_submit_button", 10, 2);
function alter_form_submit_button($button, $form){
if ($form["button"]["type"] == "text") {
// (class=) followed by (single or double quote) followed by (anything that is not a single or double quote)
$pattern = '/(class=)(\'|")([^\'"]+)/';
$replacement = '${1}${2}${3} btn';
$newbutton = preg_replace($pattern, $replacement, $button);
if ( !is_null($newbutton) ) {
return $newbutton;
}
@taupecat
taupecat / _griddr.scss
Last active December 20, 2015 22:09
griddr: formulae and mixins to create flexible, semantic grids in Sass by setting your desired number of columns, margin width (in pixels), and container context width (in pixels). TODO: prepend and append functionality.
/**
* Formulae and mixins to create any kind of evenly-spaced flexible grid
* you can possibly imagine.
*/
/**
* Our grid settings. Change as desired for your project
*/
$columns: 12; // Desired number of columns