Skip to content

Instantly share code, notes, and snippets.

View francbartoli's full-sized avatar

Francesco Bartoli francbartoli

View GitHub Profile
@mvaled
mvaled / gist:720753
Created November 29, 2010 22:22
Generates Wordpress.com's HTML from reStructuredText
#! /usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Generate an HTML Snippet for WordPress Blogs from reStructuredText.
#
# This is a modification of the standard HTML writer that leaves out
# the header, the body tag, and several CSS classes that have no use
# in wordpress. What is left is an incomplete HTML document suitable
# for pasting into the WordPress online editor.
#
@niallo
niallo / ubuntu-lucid-python-2.7
Created March 8, 2012 22:59
Puppet module to install & set default Python to 2.7 on Ubuntu 10.04 LTS / Lucid
class python27 {
Package { ensure => "installed" }
$apt-base = "/etc/apt/sources.list.d/fkrull-"
Exec { require => Package["python-software-properties"] }
exec { "python-repo" :
command => "/usr/bin/add-apt-repository ppa:fkrull/deadsnakes",
creates => "${apt-base}deadsnakes-lucid.list",
@glenrobertson
glenrobertson / TileLayer.GeoJSON.js
Created September 15, 2012 00:02
GeoJSON Leaflet Tile Layer
/*
GeoJSON layer with mouse hover events to properties for each feature
Requires JQuery to handle the AJAX requests
Currently only supports FeatureCollections
Features must have ID's, so they can be deduplicated across tiles (not rendered twice).
*/
/*
Control that shows HTML content for a point on hover
*/
@isao
isao / funcsimple.js
Created December 4, 2012 00:08
minimal cli func test with shelljs
#!/usr/bin/env node
var assert = require('assert'),
shell = require('shelljs'),
path = require('path'),
BASEDIR = path.resolve(__dirname, '../') + '/',
NEWSAPP = BASEDIR + 'examples/newsboxes/';
@max-mapper
max-mapper / readme.md
Last active January 28, 2024 18:11
How-to: Write a node module with voxel.js

Writing node modules with voxel.js

This is a short guide that will teach you the workflows that have been figured out by the voxel.js community for writing node modules + sharing them on NPM and Github. It is assumed that you have a basic understanding of JavaScript, github and the command line (if not you can check out an introduction to git and the command line or learn JS basics from JavaScript for Cats)

The voxel-tower repository on github contains all the example code from this guide.

Table of contents

@lukas-h
lukas-h / license-badges.md
Last active March 28, 2024 10:06
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@francbartoli
francbartoli / nc_to_gtiff.py
Created November 24, 2017 22:55 — forked from arbennett/nc_to_gtiff.py
Workflow for uploading data from netcdf to google earth engine
#!/usr/bin/env python2
"""
Script that allows for conversion of a netcdf file to
a stack of geotiff files with each raster being a time
slice from the input file.
Base implementation taken from:
https://www.linkedin.com/pulse/convert-netcdf4-file-geotiff-using-python-chonghua-yin
Usage:
@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active November 20, 2023 12:50
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dedsm
dedsm / timescale--db--backend--base.py
Last active March 6, 2024 21:20
WeRiot Django Timescale integration
import logging
from django.contrib.gis.db.backends.postgis.base import \
DatabaseWrapper as PostgisDBWrapper
from django.db import ProgrammingError
from .schema import TimescaleSchemaEditor
logger = logging.getLogger(__name__)
@t-book
t-book / Apache:GeoNode SSL-TLS LE Authority
Last active May 7, 2019 19:21
Add let´s enrypt to geonode
# - Close port 8080 for inbound networking
# - Edit your local_settings to use proxy /geonode (and not port 8080)
# - Add following to local_settings: AVATAR_GRAVATAR_SSL = True
# - make sure mod_ssl is active: $ a2enmod ssl
# add let´s encrypt repository
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
# install certbot