Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gaubert's full-sized avatar

Guillaume Aubert gaubert

View GitHub Profile
@gaubert
gaubert / .lftp.mockup.rc
Created February 11, 2011 08:56
~/.lftp.rc parameters detailed
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.
@gaubert
gaubert / gist:7f4f3e05845eface3861
Last active November 26, 2022 17:41
WMO_CategoryCodeList
<!- WMO_CategoryCode :: New CodeList for WMO Core Metadata Profile
-->
<gmx:codelistItem>
<gmx:CodeListDictionary gml:id="WMO_CategoryCode">
<gml:description>additional topic categories for WMO community</gml:description>
<gml:identifier codeSpace="WMO Core Metadata Profile">WMO_CategoryCode</gml:identifier>
<gmx:codeEntry>
<gmx:CodeDefinition gml:id="WMO_CategoryCode_weatherObservations">
<gml:description>weather observations</gml:description>
<gml:identifier codeSpace="WMO Core Metadata Profile">weatherObservations</gml:identifier>
@gaubert
gaubert / simple-nginx-webdav.sh
Created July 4, 2011 07:45 — forked from dysinger/simple-nginx-webdav.sh
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
@gaubert
gaubert / timsort.py
Created October 9, 2019 08:41 — forked from bee-san/timsort.py
An Python implementation of Timsort
# based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3
# Brandon Skerritt
# https://skerritt.tech
def binary_search(the_array, item, start, end):
if start == end:
if the_array[start] > item:
return start
else:
return start + 1
from random import choice
import string
import subprocess
def generate_passwd(length=8, chars=string.letters+string.digits+'{}"&$@#%*.;'):
return ''.join([choice(chars) for i in range(length)])
def generate_username(prefix="jason", index=1):
""" """
return "{}{:05d}".format(prefix, index+1)
LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@gaubert
gaubert / README.md
Created February 9, 2016 09:36 — forked from serdaradali/README.md
Interactive world globe

Zoomable/rotatable world globe that uses orthographic projection. Drag behavior is enhanced as described here: https://www.jasondavies.com/maps/rotate/

Performance is not good due to redrawing whole world upon zoom/drag.

@gaubert
gaubert / index.html
Created February 8, 2016 09:55 — forked from marcneuwirth/index.html
D3 Globe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<svg id="defs">
<defs>
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%">
@gaubert
gaubert / gist:5395645
Last active December 16, 2015 06:59
analysis

Namespaces compliance

Declare compliance with WMO CORE Metadata Profile

Could replace

@gaubert
gaubert / use -label
Last active December 11, 2015 10:08
Example of use of -label with Gmvault-1.7-beta on Linux
A) Without -label in search
------------------------
gmv@gmvault:~/old-versions/v1.7/bin$ ./gmvault sync xxxxxx@gmail.com -t custom -g "diptyque" -c no
Use gmvault-db located in /home/gmv/gmvault-db.
Disable deletion of emails that are in Gmvault db and not anymore in Gmail.
Authentication performed with Gmail XOAuth token.