Skip to content

Instantly share code, notes, and snippets.

View ImreSamu's full-sized avatar
🗺️

ImreSamu ImreSamu

🗺️
View GitHub Profile
#!/bin/sh
# To the extent possible under law, the person who associated CC0
# with this work has waived all copyright and related or neighboring
# rights to this work.
# http://creativecommons.org/publicdomain/zero/1.0/
SCRIPT_DIR=`dirname $0`
if [ -e $1 ] ; then
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
#!/usr/bin/env perl
use feature 'switch';
use strict;
use warnings;
use Data::Dumper;
use File::Basename;
use File::Copy;
use File::Path qw/make_path/;
ffmpeg -f image2 -i render-%04d.png -i audio.mp3 -r 25 -vcodec libx264 -b:v 1024k -b:a 192k -t 00:00:04 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:10 [out]" out.mp4
sudo apt-get update && sudo apt-get -y dist-upgrade && sudo shutdown -r now
# wait for reboot
# as root
apt-get autoremove -y --purge
# basics and osm2pgsql deps
apt-get install -y subversion git build-essential libxml2-dev libgeos-dev libgeos++-dev libpq-dev libbz2-dev libproj-dev protobuf-c-compiler libprotobuf-c0-dev autoconf automake libtool make g++ sysstat iotop apache2.2 apache2.2-common apache2-mpm-worker liblua5.2-dev lua5.2
mkdir -m 000 /planet
@ImreSamu
ImreSamu / bridge_swing_overpass_wizard.md
Last active August 29, 2015 14:05
OpenStreetMap - Who created the first [bridge=swing] key-values ? ( Overpass-Wizard Query )

0709

type:way and ( id:27001207 or id:72584563 ) global

@ImreSamu
ImreSamu / bridge_swing.sh
Last active August 29, 2015 14:05
query the first contributor who added bridge=swing to the way - and generate Overpass-Turbo Wizard Query
#
# Ubuntu 14.04 linux
# This example file is released into the Public Domain. ( ImreSamu 2014.08.29 )
#
## Warning! - draft code! it creates lot of temp file to the working directory.
#
#### The Job ###############################
#* find all bridge=swing ( now 639 results : http://taginfo.openstreetmap.org/search?q=bridge%3Dswing )
# *split results by the first contributor who added bridge=swing to the way
# *get the results into overpass-turbo wizard format and you can copy/paste to overpass-turbo.eu Wizard
@ImreSamu
ImreSamu / Dockerfile_for_install_osmium_tool
Created August 29, 2014 14:46
Docker file - for install osmium tool
#
# Docker file - for install osmium tool.
#
FROM ubuntu:14.04
MAINTAINER Imre Samu https://github.com/ImreSamu/
RUN export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
# Set the locale
@ImreSamu
ImreSamu / check_idpresets.sh
Last active August 29, 2015 14:09
check OpenStreetMap iD Editor Translations , Determine Duplicate Elements, Export presets to CSV
#!/bin/bash
# name: check_idpresets.sh
# check iD Editor Translations
# --- Determine Duplicate Elements,
# --- Export presets to CSV
#
# License: same as iD Editor / available under the WTFPL : http://sam.zoy.org/wtfpl/
# Created by ImreSamu for helping hungarian translations
#
# requirements :
autodock:
image: prologic/autodock
ports:
- "1338:1338/udp"
- "1338:1338/tcp"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
autodocklogger:
image: prologic/autodock-logger