Skip to content

Instantly share code, notes, and snippets.

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

Brian Monsales brickgale

🏠
Working from home
View GitHub Profile
@brickgale
brickgale / customStubHasSlots.js
Last active June 30, 2022 03:36
Used by mount/render on vue-test-utils or testing-library/vue by Stubbing a component (vue 3)
import { h } from 'vue'
export default {
name: 'CustomStubHasSlots',
props: {
tag: {
type: String,
default: 'div'
}
},
var EventEmitter = require('eventemitter3');
function Peerd(id, options) {
if (!(this instanceof Peerd)) return new Peerd(id, options)
EventEmitter.call(this);
options = util.extend({
debug: 0, // 1: Errors, 2: Warnings, 3: All logs
host: util.CLOUD_HOST,
port: util.CLOUD_PORT,
@brickgale
brickgale / .htaccess
Last active January 28, 2022 16:24
Laravel force https for Heroku
#add this on public/.htaccess for Laravel
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@brickgale
brickgale / LoginController.php
Last active November 5, 2019 03:39
Laravel 5.4 with Laravel Socialite
<?php
namespace App\Http\Controllers\Auth;
use JWTAuth;
use Socialite;
use App\User;
use App\Transformers\UserTransformer;
use App\Http\Controllers\Controller;
use Tymon\JWTAuth\Exceptions\JWTException;
@brickgale
brickgale / FileTrait.php
Created October 6, 2017 06:28
File Trait for Laravel 5.3 below
<?php
namespace App\Traits;
use Illuminate\Http\Request;
use File;
trait FileTrait {
/**
@brickgale
brickgale / .env.travis
Created August 17, 2017 05:40 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync