Skip to content

Instantly share code, notes, and snippets.

View alexanno's full-sized avatar

Alexander Salveson Nossum alexanno

View GitHub Profile
Klippe raster til et polygon for visning
* Du har en WMS
** Eksporter det område du vil ha som geotiff
*** Save as image (rimelig ok oppløsning)
*** Print composer (~300dpi)
** Last inn igjen og sett projeksjonen eksplisitt (raster-projection-assign projection)
* Finn frem favorittpolygonet ditt
** Eller tegn på frihånd et scratch layer
@alexanno
alexanno / cartodb-kurs-nmbu.md
Last active February 3, 2016 12:10
Kurs og bedriftspresentasjon for NMBU 3. februar 2016
-- http://overpass-turbo.eu/
-- https://gist.github.com/atlefren/60234fb68d8299136c05
-- http://www.norkart.no/produkt/datavarehus/
-- toalett og kommunekart
SELECT
f.cartodb_id,
f.the_geom_webmercator,
f.the_geom,
@alexanno
alexanno / index.html
Created December 3, 2015 14:45
yeBWbZ
http://www.webatlas.no/mediakart/testbuild_v2/embed/kart.htm
SELECT *,
(select string_agg(value->>'tekstfelt',', ') a from
json_array_elements(tekstfelt::json) m) tekstfelt_streng
FROM mellomlag m
SELECT row_to_json(fc)
FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features
FROM (SELECT 'Feature' As type
, ST_AsGeoJSON(lg.geom, 4)::json As geometry
, row_to_json((SELECT l FROM (SELECT fylkesnr, navn) As l
)) As properties
FROM sandbox.fylker As lg ) As f ) As fc;
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Scroll</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
@alexanno
alexanno / gist:c72bb93a2fd000411cb6
Last active October 27, 2015 14:41
havmiljo testing
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="build-web-test-plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@alexanno
alexanno / table size postgres.sql
Created October 4, 2015 05:48
list table size postgres
SELECT
table_name,
pg_size_pretty(table_size) AS table_size,
pg_size_pretty(indexes_size) AS indexes_size,
pg_size_pretty(total_size) AS total_size
FROM (
SELECT
table_name,
pg_table_size(table_name) AS table_size,
pg_indexes_size(table_name) AS indexes_size,