Skip to content

Instantly share code, notes, and snippets.

@ShrwdFlrst
ShrwdFlrst / DatesTest.php
Created January 6, 2021 10:29
Test working day transformation is within a threshold
<?php
use Carbon\CarbonImmutable;
use Carbon\CarbonPeriod;
use PHPUnit\Framework\TestCase;
class DatesTest extends TestCase
{
/**
* @param CarbonImmutable $today
@ShrwdFlrst
ShrwdFlrst / DatesTest.php
Created January 5, 2021 19:08
Working days date arithmetic test
<?php
use Carbon\CarbonImmutable;
use Carbon\CarbonPeriod;
use PHPUnit\Framework\TestCase;
class DatesTest extends TestCase
{
/**
* @param CarbonImmutable $today

Keybase proof

I hereby claim:

  • I am shrwdflrst on github.
  • I am shrwdflrst (https://keybase.io/shrwdflrst) on keybase.
  • I have a public key ASAU10o19KWeMFokXY88YqLrj8nDtfxFSrDVt-v9rwAK3go

To claim this, I am signing this object:

@ShrwdFlrst
ShrwdFlrst / Homestead.yml
Created May 4, 2018 13:13
Used for installing Pimcore with php 7.0
---
ip: "192.168.10.10"
memory: 4096
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
@ShrwdFlrst
ShrwdFlrst / after.sh
Last active May 4, 2018 13:10
Updated after.sh for Homestead for use with Pimcore
#!/bin/sh
# Run first `vagrant box add --box-version 5.0.2 laravel/homestead --provider virtualbox`
# Run first `cd ~/Homestead; git checkout v6.6.0`
set -e
sudo update-alternatives --set php /usr/bin/php7.0
# System packages
# sudo apt-get -o Dpkg::Options::="--force-confold" install php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-mysql php7.0-mbstring php7.0-mcrypt php7.0-zip php7.0-fpm
@ShrwdFlrst
ShrwdFlrst / index.html
Created October 16, 2014 09:47
Tinder swipe effect
<!doctype html>
<html class="no-js" lang="">
<head>
<style type="text/css">
.container {
position: relative;
width: 400px;
height: 400px;
margin: 20px auto;
border: 2px solid #c00;
@ShrwdFlrst
ShrwdFlrst / .bash_profile
Last active May 4, 2018 15:05
Vagrant .bash_profile
function homestead() {
( cd ~/Homestead && vagrant $* )
}
function gitft() {
git co develop
git pull
git co -b feature/${1}
}