This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET thumbnail_url = replace(thumbnail_url, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET ows_url = replace(ows_url, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET layer_params = replace(layer_params, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_maplayer SET source_params = replace(source_params, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE maps_mapsnapshot SET config = replace(config, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET supplemental_information = replace(supplemental_information, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE base_resourcebase SET csw_anytext = replace(csw_anytext, '$1', '$2')" | |
sudo -u postgres psql -d geonode -c "UPDATE django_site SET domain = replace(domain, '$1', '$2')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let v = { | |
isNum: n => !isNaN(parseFloat(n)) && isFinite(n), | |
PartiThes: n => { | |
let validates = true; | |
let str = n.split(", "); | |
str.forEach(s => { | |
let substr = s.split(" "); | |
validates = v.isNum(substr[0]) ? validates : false; | |
validates = material.includes(substr[1]) ? validates : false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleErrors(response) { | |
if (!response.ok) { | |
throw Error(response.statusText); | |
} | |
return response; | |
} | |
let thumbs = []; | |
fetch("http://master.demo.geonode.org/api/layers/") | |
.then(r => r.json()).then(data => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo service apache2 stop; sudo service tomcat8 stop | |
rm -rf geonode-project/ | |
virtualenv ~/.venv/master; source ~/.venv/master/bin/activate | |
git clone https://github.com/GeoNode/geonode-project.git -b master | |
pip install Django==1.11.16 | |
mv my_geonode/ my_geonode_old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.network "private_network", ip: "192.168.33.12" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "4024" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- Usage --- | |
sudo vim /etc/systemd/system/geonode-celery.service | |
sudo systemctl enable geonode-celery # Enables the service (on boot) | |
sudo systemctl restart geonode-celery | |
sudo systemctl start geonode-celery | |
sudo systemctl stop geonode-celery | |
sudo systemctl status geonode-celery | |
sudo systemctl daemon-reload | |
sudo systemd-analyze verify geonode-celery |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"total": 632, | |
"result": [ | |
{"@id":"https://gazetteer.dainst.org/place/2757738","gazId":"2757738","parent":"https://gazetteer.dainst.org/place/2066109","ancestors":["https://gazetteer.dainst.org/place/2044223","https://gazetteer.dainst.org/place/2042600"],"types":["administrative-unit"],"prefName":{"title":"Vlorë","language":"sqi"},"prefLocation":{"coordinates":[19.8,40.16667],"confidence":0,"publicSite":true},"identifiers":[{"value":"3344952","context":"geonames"}],"links":[{"object":"http://sws.geonames.org/3344952","predicate":"owl:sameAs"}],"provenance":["Albanian Archaeological Sites","geonames"],"parents":[{"@id":"https://gazetteer.dainst.org/place/2066109","gazId":"2066109","parent":"https://gazetteer.dainst.org/place/2044223","relatedPlaces":["https://gazetteer.dainst.org/place/2359911","https://gazetteer.dainst.org/place/2359913","https://gazetteer.dainst.org/place/2066207","https://gazetteer.dainst.org/place/2758045"],"ancestors":["https://gazetteer.dainst.org/place/2042600"],"types":["administrativ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"labels": [ | |
"Mice", | |
"Birds", | |
"Apes" | |
], | |
"data": [ | |
10, | |
20, | |
290 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"visitors": { | |
"data": { | |
"labels": [ | |
"Dogs", | |
"Cats", | |
"Elephant" | |
], | |
"datasets": [ | |
{ |