#!/bin/bash
# Using httpie: https://github.com/jakubroztocil/httpie
# test PUT dans category 881145
http --verbose --form PUT https://ice.artifica.fr/api/json/map/element key=XXXXXXXXXXXXXX parent=881145 title=point1 table=marker
This file contains hidden or 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 | |
/** | |
* Created by PhpStorm. | |
* User: geoffroycochard | |
* Date: 22/01/2020 | |
* Time: 16:49 | |
*/ | |
// src/Security/TokenAuthenticator.php | |
namespace App\Security; |
This file contains hidden or 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 | |
// Extracted from the `wp-cli` project. https://wp-cli.org/ | |
$root = $_SERVER['DOCUMENT_ROOT']; | |
$path = '/'. ltrim( parse_url( urldecode( $_SERVER['REQUEST_URI'] ) )['path'], '/' ); | |
if ( file_exists( $root.$path ) ) { | |
// Enforces trailing slash, keeping links tidy in the admin | |
if ( is_dir( $root.$path ) && substr( $path, -1 ) !== '/' ) { |
This file contains hidden or 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\Data; | |
class Todo | |
{ | |
private $todos = [ | |
1 => [ | |
'title' => 'todo1', |
This file contains hidden or 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
/** | |
* Generate Liste from artifica.Widget | |
* @param widget | |
* @param container | |
*/ | |
function generateListFromMap(widget, container) { | |
var onMarkersReady = new Promise(function (resolve, reject) { | |
var checkIfPropertyIsEvaluated = function () { | |
if (widget.markers.length !== 0) { | |
resolve(widget); |
This file contains hidden or 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
// No spider effect until zoom 18 | |
if (this.map.zoom < 18) { | |
return; | |
} | |
// Group markers by position | |
var groups = _.groupBy(this.map.markers, function (marker) { | |
return marker.latitude + ';' + marker.longitude; | |
}); |
This file contains hidden or 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
import { Injectable } from '@angular/core'; | |
import { Http, Response, Headers } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/catch'; | |
import { Account } from '../model/account-model'; | |
import hashes = require('crypto-js'); | |
import moment = require('moment'); | |
@Injectable() |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>{% block title %}Demo App!{% endblock %}</title> |