Skip to content

Instantly share code, notes, and snippets.

Jacob Bennett JacobBennett

Block or report user

Report or block JacobBennett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View S3SwapUrlGenerator.php
<?php
namespace App\Wilber\MediaLibrary\UrlGenerator;
use Illuminate\Contracts\Config\Repository as Config;
use Illuminate\Filesystem\FilesystemManager;
use Spatie\MediaLibrary\UrlGenerator\S3UrlGenerator;
class S3SwapUrlGenerator extends S3UrlGenerator
{
@JacobBennett
JacobBennett / problem.php
Created Dec 31, 2019
A little mess I had on my hands today
View problem.php
<?php
$start = Carbon::parse('2019-12-24');
$end = Carbon::parse('2020-01-04');
$birthDate = Carbon::parse('1985-12-24')->addDays(random_int(0,6));
// figure out if month and day of birthDate is between the $start and $end
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@JacobBennett
JacobBennett / fonts.js
Created Aug 8, 2019
List all font styles being used on the page
View fonts.js
var ret={};
$('*').each(function () {
var str = $(this).css('font-family');
str = str + ':' + $(this).css('font-weight');
str = str + ':' + $(this).css('font-style');
if (ret[str] ) {
ret[str] = ret[str] + 1;
} else {
ret[str] = 1;
}
@JacobBennett
JacobBennett / Readme.MD
Last active Apr 29, 2019
Regarding Filesystems
View Readme.MD
@JacobBennett
JacobBennett / toInt.php
Created Feb 11, 2019
Handle the conversion of a float (decimal) to an integer.
View toInt.php
<?php
function toInt($float)
{
// handle blank values
if (blank($float)) {
return 0;
}
// separate at decimal
View CheckboxIndicator.vue
<template>
<section>
<span class="circle" :class="{current: current, completed: complete}">
<span v-if="complete" class="fa fa-check u-icon__inner text-white"></span>
</span>
<small class="description"><slot></slot></small>
</section>
</template>
<script>
@JacobBennett
JacobBennett / clean-up-boot-partition-ubuntu.md
Created Apr 24, 2018 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
You can’t perform that action at this time.