View mobileGridToBlueRockTELKeys.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function map() | |
{ | |
return [ | |
/** | |
* line 4: | |
*/ | |
4 => [ | |
1 => ['grid_name'], | |
], |
View gist:7c65052719efe057cd46acbb857f2895
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function checkConflicts(array $daysOfWeek, array $timeSpan, $callQueueId, $callQueueTimeSpanId = null) | |
{ | |
$conflicts = 0; | |
if ($callQueueTimeSpanId) { | |
foreach ($daysOfWeek as $dayOfWeek) { | |
$conflicts += CallQueueTimeSpan::where('call_group_id', $callQueueId) | |
->where('id', '!=', $callQueueTimeSpanId) |
View gist:38b37d7520426a9b98647e7923210646
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function checkConflicts(array $daysOfWeek, array $timeSpan, $callQueueGroupId, $callQueueGroupTimeSpanId = null) | |
{ | |
$conflicts = 0; | |
if ($callQueueGroupTimeSpanId) { | |
foreach ($daysOfWeek as $dayOfWeek) { | |
$conflicts += CallQueueGroupTimeSpan::where('call_queue_group_id', $callQueueGroupId) | |
->where('id', '!=', $callQueueGroupeTimeSpanId) |
View gist:61e98162771a6efbef9d7ee22d510198
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// function checkTypeCount() { | |
// | |
// $(".type").change(function () { | |
// let type = $(this).val(); | |
// | |
// let typeCount = 0; | |
// | |
// if (type=='m') { | |
// typeCount = 10; |
View gist:56e3723091068cfa2404c7997cc87620
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="accordion" class="accordion mt-3"> | |
<div class="card mt-1"> | |
<div class="card-header" id="headingOne" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> | |
<h5 class="mb-0"> | |
<button class="btn btn-link collapsed" type="button"> | |
Title 1 | |
</button> | |
</h5> | |
</div> | |
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordion"> |
View ovhClick2Call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\ConfigOvh; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Session; | |
use Ovh\Api; |
View gist:c0cc8ad13eea1fd8d321a0deac428ee6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function handle() | |
{ | |
// I get manually the data from Strava | |
$start = '2020-04-25'; | |
$data['2020']['mileage'] = 2183.5; | |
$data['2020']['time'] = 231; | |
$data['2021']['mileage'] = 526.5; | |
$data['2021']['time'] = 49; | |
$mileage = 0; |
View ApiIncomingMailController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function store(Request $request) | |
{ | |
//app('log')->debug(request()->all()); | |
$body = "body-html"; | |
$body = $request->$body; | |
if (! $body) { | |
$body = ''; | |
} |
View Import.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Import | |
{ | |
public function prospects() | |
{ | |
$file = 'axonaut/prospects.csv'; | |
if (Storage::disk('ftp')->exists($file)) { | |
$data = Storage::disk('ftp')->get($file); | |
$lines = explode("\n", $data); |
View Jours fériés France
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function nextWorkingDay(Carbon $date) | |
{ | |
$holidays = []; | |
$holidays[] = Carbon::create($date->format('Y'), 1, 1); | |
$holidays[] = Carbon::create($date->format('Y'), 5, 1); | |
$holidays[] = Carbon::create($date->format('Y'), 5, 8); | |
$holidays[] = Carbon::create($date->format('Y'), 7, 14); | |
$holidays[] = Carbon::create($date->format('Y'), 8, 15); | |
$holidays[] = Carbon::create($date->format('Y'), 11, 1); | |
$holidays[] = Carbon::create($date->format('Y'), 11, 11); |
NewerOlder