Skip to content

Instantly share code, notes, and snippets.

View illmatix's full-sized avatar
😁

Chad Payne illmatix

😁
  • Calgary, Alberta
  • 23:13 (UTC -06:00)
View GitHub Profile
@illmatix
illmatix / chrome_browser_chromedriver_setup.sh
Last active January 5, 2024 15:55
Chrome Browser and Chrome Driver setup for Latest Release Stable
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root (or with sudo)"
exit 1
fi
function install_google_chrome() {
echo "Checking googlechromelabs.github.io/chrome-for-testing latest release version"
wget --no-verbose -O /tmp/chrome_latest_stable https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE
<?php
namespace MyProject\Facades;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Facade as BaseFacade;
use Volume;
use Trend;
class Indicator
<?php
<?php
namespace App\Observers\CalculatedTimesheetHours;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use App\Models\CalculatedTimesheetHours;
use App\Models\EmployeeBillingRates;
/**
* @desc Primary jsx file for the fancy search react component.
* @author Chad Payne chad@simplesimple.ca
*/
var FancySearchInput = React.createClass({
getInitialState: function() {
var string;
if(typeof this.props.text !== 'undefined') {
@illmatix
illmatix / aliases.drushrc.php
Last active April 7, 2016 23:47
Revised Drush aliases for devboxes. Checks all the aliaes and determines if they're local or remote aliases.
<?php
/**
* @file aliases.drushrc.php
* Author: Chad Payne <chadpayne@gmail.com>
* Date: Apr 7th 2016
*
* Automatic alias Generation for drush sa.
* Updated to allow for local site alias and to ignore any gitlab remotes
*/
<?php
function ss_menu_location_term_name_load($term_name) {
module_load_include('inc', 'pathauto');
$vocab = taxonomy_vocabulary_machine_name_load('ss_menu_vocab_categories');
$vocabTree = taxonomy_get_tree($vocab->vid, 0, NULL, TRUE);
$cleanstrings = array();
foreach($vocabTree as $term) {
$cleanstring = pathauto_cleanstring($term->name);
<?php
function ss_menu_location_menu() {
// Generic drink paths
$day_of_the_week = strtolower(date('l'));
$parent_term = taxonomy_get_term_by_name('Drink Menu');
$child_term = taxonomy_get_term_by_name(date('l'));
$items['drink/drink-menu/' . $day_of_the_week] = array(
'title' => 'Drink',
<?php
function ss_menu_location_menu() {
$items['location/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'ss_menu_location_edit_redirect',
'page arguments' => array(1),
'access callback' => 'ss_menu_location_access',
<?php
function ss_menu_location_menu() {
$items['location/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'ss_menu_location_edit_redirect',
'page arguments' => array(1),
'access callback' => 'ss_menu_location_access',
'access arguments' => array('edit', 1),
<?php
function ss_menu_location_menu() {
$items['location/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'ss_menu_location_edit_redirect',
'page arguments' => array(1),
'access callback' => 'ss_menu_location_access',
'access arguments' => array('edit', 1),