Skip to content

Instantly share code, notes, and snippets.

View ShamarKellman's full-sized avatar

Shamar Kellman ShamarKellman

View GitHub Profile
@ShamarKellman
ShamarKellman / MockSocialite.php
Created September 24, 2021 02:53 — forked from jlmaners/MockSocialite.php
Mocking Socialite
<?php
$mockSocialite = \Mockery::mock('Laravel\Socialite\Contracts\Factory');
$this->app['Laravel\Socialite\Contracts\Factory'] = $mockSocialite;
$abstractUser = Mockery::mock('Laravel\Socialite\Two\User');
$abstractUser
->shouldReceive('getId')
->andReturn(rand())
->shouldReceive('getName')
@ShamarKellman
ShamarKellman / RadioBox.vue
Created July 26, 2021 15:04 — forked from Jonarod/RadioBox.vue
Simple custom Radio component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <RadioBox label="Foo" value="foo" v-model="MySelectedValue" />
* <RadioBox label="Bar" value="bar" v-model="MySelectedValue" />
* <RadioBox label="Baz" value="baz" v-model="MySelectedValue" />
*
* data(){
* return {
* MySelectedValue: "",
@ShamarKellman
ShamarKellman / letsencrypt_2019.md
Created December 5, 2019 17:48 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@ShamarKellman
ShamarKellman / KeyMultiselect.vue
Created October 20, 2019 13:04 — forked from jacobg/KeyMultiselect.vue
Extensions for the vue-multiselect component
<template>
<multiselect
v-bind="$attrs"
v-on="listeners"
:value="completeValue"
:options="options"
:track-by="trackBy"
:taggable="taggable"
@tag="addTag"
class="key-multiselect"
@ShamarKellman
ShamarKellman / upload.component.ts
Created November 20, 2018 11:18 — forked from StephenFluin/upload.component.ts
Firebase Uploader Component with Angular 2
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { AngularFire, FirebaseListObservable } from 'angularfire2';
import { Observable } from 'rxjs';
declare var firebase: any;
interface Image {
path: string;
@ShamarKellman
ShamarKellman / Contract Killer 3.md
Created October 17, 2016 15:56
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@ShamarKellman
ShamarKellman / cnmp.sh
Created October 17, 2016 14:05 — forked from kookxiang/cnmp.sh
CNMP (Centos 7 + Nginx + MariaDB + PHP7) Install Script
#!env bash
installCNMP(){
if [[ -e /etc/redhat-release ]]; then
RELEASE_RPM=$(rpm -qf /etc/centos-release)
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM})
if [ ${RELEASE} != "7" ]; then
echo "Not CentOS release 7."
exit 1
fi
else
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
<?php
/*
Plugin Name: My Widget
Plugin URI: http://mydomain.com
Description: My first widget
Author: Me
Version: 1.0
Author URI: http://mydomain.com
*/