Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc Picaud marcpicaud

View GitHub Profile
@marcpicaud
marcpicaud / install-gdal.sh
Created Jul 1, 2020 — forked from rastermanden/install-gdal.sh
install gdal with python amazon AMI
View install-gdal.sh
sudo yum-config-manager --enable epel
sudo yum install gdal-python
sudo yum -y update
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.2.4/gdal-2.2.4.tar.gz | tar zxf -
cd gdal-2.2.4/
./configure --prefix=/usr/local --with-python
make -j4
sudo make install
@marcpicaud
marcpicaud / script.pl
Created Nov 6, 2019
Discover commit pattern
View script.pl
#!/usr/bin/perl
# usage:
#
# git log --author="Marc Picad" --format="%H %ai" | perl script.pl
#
use strict;
use warnings FATAL => 'all';
use utf8;
View index.js
// Pour faire des requêtes HTTP
const request = require('request');
// Pour gérer le filesystem local
const fs = require('fs');
// Headers de la requête HTTP
const headers = {
'Origin': 'http://www.fiv.fr',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept': '*/*',
View index.js
const express = require('express');
const bodyParser = require('body-parser');
const amqp = require('amqplib');
const q = 'tasks';
var app = express();
app.use(bodyParser.json());
// Publisher
View catalog_db.sql
SET SESSION sql_mode = '';
SET NAMES 'utf8';
CREATE TABLE `accessory` (
`id_product_1` int(10) unsigned NOT NULL,
`id_product_2` int(10) unsigned NOT NULL,
KEY `accessory_product` (`id_product_1`,`id_product_2`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
CREATE TABLE `address` (
View .pre-commit-config.yaml
- repo: git://github.com/marcpicaud/addons-pre-commit
sha: master
hooks:
- id: php-lint-all
files: \.(php)$
- id: php-cs
files: \.(php)$
args: [--standard=PSR2 -p]
- id: php-cbf
file: \.(php)$