Skip to content

Instantly share code, notes, and snippets.

Avatar

Éric Lemoine elemoine

View GitHub Profile
@elemoine
elemoine / apache.conf
Created Aug 30, 2019
Apache mod_fcgid configuration for QGIS Server
View apache.conf
<VirtualHost *:80>
DocumentRoot /home/www/qgis-server
ServerName 172.16.0.162
ErrorLog ${APACHE_LOG_DIR}/qgis-server-error.log
LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" custom
CustomLog ${APACHE_LOG_DIR}/qgis-server-access.log custom
FcgidMaxRequestsPerProcess 1000
FcgidInitialEnv QGIS_SERVER_LOG_FILE /tmp/qgis-000.log
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 2
View marshmallow-testcase.py
from sqlalchemy import Column, Integer, String, ForeignKey, MetaData, create_engine
from sqlalchemy.orm import sessionmaker, relationship, scoped_session
from sqlalchemy.ext.declarative import declarative_base
from marshmallow import fields
from marshmallow_sqlalchemy import ModelSchema
engine = create_engine("postgresql://elemoine@localhost/gis", echo=True)
metadata = MetaData(engine)
@elemoine
elemoine / mapserver-fastcgi.conf
Created Mar 15, 2018
MapServer Apache FastCGI configuration snippet
View mapserver-fastcgi.conf
RewriteRule "^/ogc/(.*)$" "-" [E=MS_MAPFILE:/var/www/$1.map]
<Location "/ogc/">
SetHandler fcgid-script
Options +ExecCGI
FcgidWrapper /usr/lib/cgi-bin/mapserv virtual
Require all granted
</Location>
View README.md

morton-plot

Requirements:

  • mapplotlib
  • numpy

Usage

@elemoine
elemoine / openstack-cheatsheet.txt
Last active Sep 28, 2017
OpenStack cheatsheet
View openstack-cheatsheet.txt
keystone
--------
keystone tenant-list
openstack project list
keystone tenant-create --name <tenant-name> --description <tenant-desc> --enabled true
openstack project create <project-name> --description <project-desc> --enable
keystone user-create --name <user-name> --tenant <tenant-name> --pass <user-password> --email <user-email> --enabled true
View heka-idle-packs-2.txt
2016/04/08 21:24:36 Pre-loading: [keystone_7_0_decoder]
2016/04/08 21:24:36 Pre-loading: [elasticsearch_encoder]
2016/04/08 21:24:36 Pre-loading: [influxdb_encoder]
2016/04/08 21:24:36 Pre-loading: [http_metrics_filter]
2016/04/08 21:24:36 Pre-loading: [influxdb_accumulator_filter]
2016/04/08 21:24:36 Pre-loading: [keystone_7_0_logstreamer]
2016/04/08 21:24:36 Pre-loading: [elasticsearch_output]
2016/04/08 21:24:36 Pre-loading: [influxdb_output]
2016/04/08 21:24:36 Pre-loading: [openstack_splitter]
2016/04/08 21:24:36 Pre-loading: [NullSplitter]
@elemoine
elemoine / heka-idle-packs.txt
Created Apr 4, 2016
Heka idle packs and diagnostics
View heka-idle-packs.txt
2016/03/31 11:56:20 Diagnostics: 30 packs have been idle more than 120 seconds.
2016/03/31 11:56:20 Diagnostics: (inject) Plugin names and quantities found on idle packs:
2016/03/31 11:56:20 Diagnostics: influxdb_accumulator_filter: 30
2016/03/31 11:56:20
2016/03/31 11:56:20 Diagnostics: 32 packs have been idle more than 120 seconds.
2016/03/31 11:56:20 Diagnostics: (input) Plugin names and quantities found on idle packs:
2016/03/31 11:56:20 Diagnostics: elasticsearch_output: 32
2016/03/31 11:56:20 Diagnostics: http_metrics_filter: 32
2016/03/31 11:56:20
2016/03/31 11:56:23 Queue report initiated.
View keybase.md

Keybase proof

I hereby claim:

  • I am elemoine on github.
  • I am elemoine (https://keybase.io/elemoine) on keybase.
  • I have a public key whose fingerprint is F1AD 5DD0 D92F F17D 08A1 5E0B 2688 7FF0 E588 ECCD

To claim this, I am signing this object:

View devstack.bash
#!/bin/bash
# https://gist.github.com/elemoine/27748e205d36a9006190
# Install packages.
sudo apt-get install kvm cloud-utils
# Download an Ubuntu cloud image.
wget http://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img -O disk.img.dist
# Create user-data file for devstack.
View print-spec.json
{
"attributes": {
"map": {
"dpi": 72,
"center": [
681185,
6412222
],
"projection": "EPSG:3857",
"scale": 10000,