Skip to content

Instantly share code, notes, and snippets.

Charles Peterson Artistan

View GitHub Profile
View gitlab-dev.md
@Artistan
Artistan / gw-calc-subtotal.php
Created Oct 19, 2018 — forked from spivurno/gw-calc-subtotal.php
Gravity Wiz // Gravity Forms // Calculation Subtotal Merge Tag
View gw-calc-subtotal.php
<?php
/**
* --- STOP! ---
* Get the latest version:
* https://gravitywiz.com/documentation/gravity-forms-ecommerce-fields/
* -------------
*
* Calculation Subtotal Merge Tag
*
* Adds a {subtotal} merge tag which calculates the subtotal of the form. This merge tag can only be used
@Artistan
Artistan / routes-api.php
Created Sep 4, 2018
Laravel API routes
View routes-api.php
<?php
use Illuminate\Http\Request;
// api auth routes...
Route::group(['middleware' => ['auth:api']], function () {
// unversioned api routes
Route::get('/user', function (Request $request) {
return $request->user();
});
@Artistan
Artistan / Extend.php
Created Aug 22, 2018
Laravel 5.6 Password does/not contain login name
View Extend.php
<?php
namespace App;
use Illuminate\Support\Facades\Input;
use Illuminate\Validation\Validator;
/**
* Class Extend
*/
class Extend
@Artistan
Artistan / Application.php
Created Aug 13, 2018
override laravel application class
View Application.php
<?php
namespace Artistan\ZeroNullDates\Tests;
use Illuminate\Foundation\Application as IllApplication;
class Application extends IllApplication
{
/**
* The custom configuration path defined by the developer.
@Artistan
Artistan / a ngrok_background.sh
Last active Dec 10, 2019 — forked from rjz/ngrok_hostname.sh
Get ngrok hostname from command line
View a ngrok_background.sh
#!/bin/sh
########################################################################################
# I do not need to use the ngrok subdomains...
# start ngrok for my local box (vagrant homestead) in th background
# get the cname from command line for the ngrok alias
# update my subdomain cname to point at new ngrok name
# use it!!!
########################################################################################
# requires ngrok and jq installed.
@Artistan
Artistan / Upsert.php
Created Aug 6, 2018
Upsert Eloquent Model
View Upsert.php
<?php
namespace My\Database;
trait Upsert {
/**
* @requires @param string $primaryKey
* OR
* @requires @param array $unique_keys
*
@Artistan
Artistan / composer.sh
Created Jul 19, 2018
Easiest Composer Install
View composer.sh
#!/bin/bash
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer
@Artistan
Artistan / How to nav.md
Created Jul 9, 2018
Bootstrap 4.1 Navs
View How to nav.md

Bootstrap 4.1

Using data attributes

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab", data-toggle="pill", or data-toggle="list" on an element. Use these data attributes on .nav or .list-group.

Required data attributes

Toggle elements

View love.css
/**
* css for the love of it.
**/
You can’t perform that action at this time.