Skip to content

Instantly share code, notes, and snippets.

View diyfr's full-sized avatar

Stéphane diyfr

  • Nantes, FR
View GitHub Profile
@diyfr
diyfr / cors.conf
Created May 23, 2017 09:13
Apache Proxy CORS configuration for fcm.googleapis.com
<VirtualHost *:80>
ServerName domain.com # configure your domain
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
#Don't miss to enable mod_header and mod_proxy
#replace fcm.googleapis.com in fcm endpoint registration
ProxyRequests Off
<Location /fcm/>
@diyfr
diyfr / subdomain.domain.conf
Last active June 28, 2024 01:55
Apache conf for reverse proxy with HTTPS let's encrypt
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName subdomain.domain.ovh
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Include external config for specific locationInclude
Include /home/userapp/apache.conf/web.conf
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
@diyfr
diyfr / sample_response_train.json
Last active March 9, 2018 11:01
Rechercher un train avec les Apis SNCF https://www.digital.sncf.com/startup/api
{
"vehicle_journeys" : [{
"codes" : [],
"name" : "866324",
"journey_pattern" : {
"id" : "journey_pattern:5756",
"name" : "journey_pattern:5756"
},
"disruptions" : [{
"internal" : true,
@diyfr
diyfr / gare.html
Last active May 20, 2019 09:38
Rechercher les premiers trains au départ d'une gare en utilisant le code UIC avec les Apis SNCF https://www.digital.sncf.com/startup/api
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
@diyfr
diyfr / InstallGogs_ubuntu16.04.md
Last active May 24, 2017 11:52
Install an private web-based Git repository manager on ubuntu 16.04 : Gogs
@diyfr
diyfr / keys.pipe.ts
Created June 14, 2017 08:04
Angular 4 Pipe to display the properties of an object and recursively
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'keys' })
export class KeysPipe implements PipeTransform {
transform(value, args: string[]): any {
return this.convert(value);
}
public convert = function (value) {
@diyfr
diyfr / itineraire.html
Last active March 9, 2018 11:01
Recherche d'un itinéraire à partir des codes UIC de la gare de départ et la gare d'arrivée en utilisant les Apis SNCF https://www.digital.sncf.com/startup/api
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
@diyfr
diyfr / client.sh
Last active July 3, 2017 07:25
Sécurisation d'un serveur apache avec des certificat utilisateurs
#!/bin/bash
# =============================================================================
# Application : Génération de certificat utilisateur
# Fichier : domain.sh
# Description : Script de génération de certificat utilisateur
# Version : 1.0
# =============================================================================
# Historique :
# 29/06/2017 : 1.0 diyfr - creation
# =============================================================================
mkdir myorga
cd myorga
mkdir certs
mkdir crl
mkdir newcerts
mkdir private
mkdir req
@diyfr
diyfr / createPWA.bat
Last active July 21, 2017 08:36
Transform a started angular 4 project with angular-cli to a Progressive Web App
@echo off
if [%1]==[] (
@echo "Project name missing !!"
goto eof
)
if exist %~s1\NUL (
@echo "Project Exist !!"
goto eof
)