Skip to content

Instantly share code, notes, and snippets.

# - 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
@d3netxer
d3netxer / data-gov-csw-howto.rst
Created January 23, 2018 23:26 — forked from kalxas/data-gov-csw-howto.rst
Data.gov CSW HowTo
@d3netxer
d3netxer / switch-local-git-repo-to-fork.md
Created December 7, 2017 17:15 — forked from jpierson/switch-local-git-repo-to-fork.md
How to move to a fork after cloning

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step)

    git clone git@github...some-repo.git
@d3netxer
d3netxer / index.html
Last active March 1, 2017 15:25 — forked from d3noob/index.html
Leaflet.draw plugin with options set.
<!DOCTYPE html>
<html>
<head>
<title>Leaflet.draw Plugin</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
<link
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //