Skip to content

Instantly share code, notes, and snippets.

@fideloper
fideloper / microsoft_graph_api_php_jwt.md
Last active October 7, 2024 13:51
Microsoft Graph API - oAuth apps with PHP and JWT certification authentication

Microsoft Graph API - oAuth apps with PHP and JWT certification authentication

If you've ever wanted to create an oAuth style application with Microsoft, you might have felt this pain before.

In true Enterprise Microsoft Fashion™, there's a lot going on.

This will be a bit long because of that. I hope I haven't missed anything (but I'm sure I have)!

We'll be using PHP (Laravel in my case).

<?php
namespace App\Charts;
use App\Support\Livewire\ChartComponentData;
use ConsoleTVs\Charts\Classes\Chartjs\Chart;
/**
* Class WanSpeedTestsChart
*
@calebporzio
calebporzio / tinker_helper.php
Created January 30, 2019 23:56
A quick, memorable way to initiate an "artisan tinker" session and play with variables.
<?php
function tinker(...$args) {
// Because there is no way of knowing what variable names
// the caller of this function used with the php run-time,
// we have to get clever. My solution is to peek at the
// stack trace, open up the file that called "tinker()"
// and parse out any variable names, so I can load
// them in the tinker shell and preserve their names.
@niraj-shah
niraj-shah / sequential.js
Created October 8, 2018 16:18
Sequential Ajax Calls using jQuery
// parameters for ajax calls
var items = [
{ 'gender': 'male', 'nat': 'US' },
{ 'gender': 'female', 'nat': 'GB' }
];
// function to trigger the ajax call
var ajax_request = function(item) {
var deferred = $.Deferred();