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
//
// This function moves long emails in your Inbox to the Archive folder and warn the sender that you don't want to read too long emails.
// It could be very useful if you want to keep a clean inbox and spend less time reading and writring emails
// Just run it every 5 minutes (for example) and you'll be fine!
//
// Copyleft - Antoine AUGUSTI - www.antoine-augusti.fr - 2013
//
function filterLongEmails()
{
@AntoineAugusti
AntoineAugusti / gist:6200354
Created August 10, 2013 13:02
Sort array of users objects, based on their name
<?php
class User
{
protected $name;
/*
Returns < 0 if $a->name is less than $b->name; > 0 if $a->name is greater than $b->name, and 0 if they are equal.
*/
static function sortUsersName(User $a, User $b)
{
<?php
$PieChart = new Chart('pie', 'examplePie');
$PieChart->set('data', array(2, 10, 16, 30, 42));
$PieChart->set('legend', array('Work', 'Eat', 'Sleep', 'Listen to music', 'Code'));
$PieChart->set('displayLegend', true);
echo $PieChart->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>
<?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
$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
$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
$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();
?>
{
"dictionary": "Packages/Language - French/fr-moderne.dic",
"extensions":
[
"tex"
],
"spell_check": true,
"auto_complete": true
}
{
"name": "yourApp",
"require": {
"mv/laravel-google-authenticator": "dev-master"
},
"autoload": {
"classmap": [
"vendor/mv/laravel-google-authenticator",
"vendor/mv/laravel-google-authenticator/library"
]