Skip to content

Instantly share code, notes, and snippets.

View AntoineAugusti's full-sized avatar
🚄
High speed, low carbon

Antoine Augusti AntoineAugusti

🚄
High speed, low carbon
View GitHub Profile
$ php -S localhost:8080
<?php
session_start();
// Include vendor autoload
include 'vendor/autoload.php';
// Your website name, or URL. It will be displayed in Google Authenticator
define("WEBSITE_URL", 'exampleWebsite');
// The username of the user
$username = "username";
$ composer update
{
"name": "yourApp",
"require": {
"mv/laravel-google-authenticator": "dev-master"
},
"autoload": {
"classmap": [
"vendor/mv/laravel-google-authenticator",
"vendor/mv/laravel-google-authenticator/library"
]
{
"dictionary": "Packages/Language - French/fr-moderne.dic",
"extensions":
[
"tex"
],
"spell_check": true,
"auto_complete": true
}
<?php
$PolarChart = new Chart('polar', 'examplepolar');
$PolarChart->set('data', array(20, 55, 16, 30, 42));
$PolarChart->set('legend', array('A', 'B', 'C', 'D', 'E'));
echo $PolarChart->returnFullHTML();
?>
<?php
$RadarChart = new Chart('radar', 'exampleradar');
$RadarChart->set('data', array(20, 55, 16, 30, 42));
$RadarChart->set('legend', array('A', 'B', 'C', 'D', 'E'));
echo $RadarChart->returnFullHTML();
?>
<?php
$BarChart = new Chart('bar', 'examplebar');
$BarChart->set('data', array(array(2, 10, 16, 30, 42), array(42, 30, 16, 10, 2)));
$BarChart->set('legend', array('01/01', '01/02', '01/03', '01/04', '01/05'));
// We don't want to use the x-axis for the legend so we specify the name of each dataset
$BarChart->set('legendData', array('Annie', 'Marc'));
$BarChart->set('displayLegend', true);
echo $BarChart->returnFullHTML();
?>
<?php
$DoughnutChart = new Chart('doughnut', 'exampleDoughnut');
$DoughnutChart->set('data', array(2, 10, 16, 30, 42));
$DoughnutChart->set('legend', array('Work', 'Eat', 'Sleep', 'Listen to music', 'Code'));
$DoughnutChart->set('displayLegend', true);
// We want to display percentages
$DoughnutChart->set('legendIsPercentage', true);
echo $DoughnutChart->returnFullHTML();
?>
<?php
require "Chart.php";
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Charts</title>
<link rel="stylesheet" href="chart.css">
<script src="ChartJS.min.js"></script>