This file contains hidden or 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
| TRUNCATE current_relation_members CASCADE; | |
| TRUNCATE current_relation_tags CASCADE; | |
| TRUNCATE current_relations CASCADE; | |
| TRUNCATE current_way_nodes CASCADE; | |
| TRUNCATE current_way_tags CASCADE; | |
| TRUNCATE current_ways CASCADE; | |
| TRUNCATE current_node_tags CASCADE; | |
| TRUNCATE current_nodes CASCADE; |
This file contains hidden or 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 | |
| ############################################################################### | |
| # | |
| # This script will create an osmosis compatible database. The | |
| # OSMOSIS_HOME environment variable must be set. | |
| # | |
| # | |
| ############################################################################### |
This file contains hidden or 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
| psql -U osm -d postgres -c "\l" | grep atlas-* | awk '{print $1}' | xargs -n 1 dropdb -U osm |
This file contains hidden or 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
| CREATE OR REPLACE FUNCTION truncate_tables(username IN VARCHAR) RETURNS void AS $$ | |
| DECLARE | |
| statements CURSOR FOR | |
| SELECT tablename FROM pg_tables | |
| WHERE tableowner = username AND schemaname = 'public'; | |
| BEGIN | |
| FOR stmt IN statements LOOP | |
| EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; | |
| END LOOP; | |
| END; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| width: 960px; | |
| height: 500px; | |
| position: relative; | |
| } |
This file contains hidden or 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
| Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
| (if you aren't using version 9.1.5, change line 6 with the correct version) | |
| 1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| 2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
| 3. brew update | |
| 4. brew upgrade postgresql | |
| 5. initdb /usr/local/var/postgres -E utf8 | |
| 6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
| 7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
This file contains hidden or 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
| " ============================================================================ | |
| " Vundle initialization | |
| " Avoid modify this section, unless you are very sure of what you are doing | |
| " no vi-compatible | |
| set nocompatible | |
| " Setting up Vundle - the vim plugin bundler | |
| let iCanHazVundle=1 | |
| let vundle_readme=expand('~/.vim/bundle/vundle/README.md') |
This file contains hidden or 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
| # bash/zsh completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # | |
| # *) local and remote branch names | |
| # *) local and remote tag names |