Skip to content

Instantly share code, notes, and snippets.

View francbartoli's full-sized avatar

Francesco Bartoli francbartoli

View GitHub Profile
@francbartoli
francbartoli / Dockerfile
Last active August 29, 2015 14:08 — forked from ict4eo/Dockerfile
# GeoNode / GeoServer install for Docker
# Save file as Dockerbuild; run sudo
# VERSION 0.0.1
# TEST = 'foo'
FROM ubuntu
MAINTAINER Derek Hohls <dhohls@csir.co.za>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
# GeoNode / GeoServer install for Docker
# Save file as Dockerbuild; sudo docker build -t ubuntu/testgeo3 .
# VERSION 1.0.0
FROM ubuntu
MAINTAINER Derek Hohls <dhohls@csir.co.za>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
@francbartoli
francbartoli / gist:2257378
Created March 30, 2012 23:04 — forked from mvaled/gist:720753
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.
#

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

<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
import scraperwiki
import lxml.html
html = scraperwiki.scrape("http://www.greatamericanbeerfestival.com/at-the-festival/breweries-at-the-2012-festival")
root = lxml.html.fromstring(html)
i = 1
for tr in root.cssselect("#brewery_table tbody tr"):
tds = tr.cssselect("td")
data = {
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
#!/bin/bash
# setup repository
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add -
sudo chmod 655 /etc/apt/sources.list
sudo echo "deb http://apt.opengeo.org/ubuntu lucid main" >> /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
sudo apt-get update
# install opengeo suite
import os
import os.path
import re
import fabric.api
import fabric.tasks
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
SUDO_PREFIX = re.compile(r'/(root|sudo)_?', re.I)
[main]
host = https://www.transifex.com
type = PROPERTIES
[udig.udig_plugin]
file_filter = plugins/net.refractions.udig/plugin_<lang>.properties
source_file = plugins/net.refractions.udig/plugin.properties
source_lang = en
[udig.udig_browser-plugin]