Skip to content

Instantly share code, notes, and snippets.

View the-cc-dev's full-sized avatar
💭
searching for inspiration.

Cat the-cc-dev

💭
searching for inspiration.
View GitHub Profile
@mabasic
mabasic / auth.php
Created September 26, 2016 11:01
`config/auth.php` for JWT Authentication in Lumen
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
@watson
watson / README.md
Last active August 28, 2024 05:54
A list of search and replace unix commands to help make a node repository 'standard' compliant

The standard code style linter is a great tool by Feross - check it out!

Remove trailing semicolons:

find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;

Ensure space between function and opening bracket:

@mabasic
mabasic / helpers.php
Last active February 3, 2025 19:47
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@mabasic
mabasic / Envoy.blade.php
Last active June 5, 2023 05:01
Envoy common features with Slack notifications. See http://laravel.com/docs/5.0/envoy for more info.
@servers(['web' => '[email protected] -p 1234'])
@setup
$project_name = 'Project Name';
$project_url = 'http://project-domain.com/';
$project_root = '/www/project/web';
$slack_hook = 'your-slack-hook-url';
$slack_channel = '#channel';
@endsetup
@mabasic
mabasic / Envoy.blade.php
Last active December 20, 2019 02:48
Envoy common features
@servers(['web' => '[email protected] -p 1234'])
@setup
$path = "/path/to/site";
@endsetup
@task('down')
cd {{ $path }}
php artisan down
@endtask
@mabasic
mabasic / NewRelicAppName.php
Created April 16, 2015 10:54
Add this to your PHP Application to set Application Name for New Relic monitoring.
/*
|--------------------------------------------------------------------------
| New Relic App Name
|--------------------------------------------------------------------------
|
| If the extension `newrelic` is loaded then
| set the name of the app to something.
|
*/
@digisavvy
digisavvy / gulpfile.js
Created September 22, 2014 17:05
Gulpfile config
// Load plugins
var gulp = require('gulp'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
@mabasic
mabasic / ArrayValidation.php
Last active December 20, 2019 02:48
Custom Array Validation for Laravel
<?php
class ArrayValidation extends Illuminate\Validation\Validator
{
public function validatePeriodArray($field, $values, $params)
{
$valid = true;
foreach($values as $value)
{
@mabasic
mabasic / environment.php
Last active December 20, 2019 02:47
Laravel - detectEnvironment
<?php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active February 27, 2025 20:09
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html