Skip to content

Instantly share code, notes, and snippets.

View Rub21's full-sized avatar
🐕

Ruben L. Mendoza Rub21

🐕
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
gs://osm-seed-test/database/osm-seed-2018-10-16:19:23.sql.gz
Copying gs://osm-seed-test/database/osm-seed-2018-10-16:19:23.sql.gz...
\ [1 files][ 76.2 MiB/ 76.2 MiB] 4.9 MiB/s
Operation completed over 1 objects/76.2 MiB.
gunzip < $restoreFile | psql -h $POSTGRES_HOST -U $POSTGRES_USER -d $POSTGRES_DB
gs://osm-seed-test/database/osm-seed-2018-10-16:19:23.sql.gz
Copying gs://osm-seed-test/database/osm-seed-2018-10-16:19:23.sql.gz...
/ [1 files][ 76.2 MiB/ 76.2 MiB] 5.7 MiB/s
Operation completed over 1 objects/76.2 MiB.
SET
root@usa-db-0:~# wget https://raw.githubusercontent.com/openstreetmap/osmosis/master/package/script/contrib/apidb_0.6_osmosis_xid_indexing.sql
--2018-10-15 17:15:52-- https://raw.githubusercontent.com/openstreetmap/osmosis/master/package/script/contrib/apidb_0.6_osmosis_xid_indexing.sql
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.200.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.200.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 775 [text/plain]
Saving to: ‘apidb_0.6_osmosis_xid_indexing.sql’
apidb_0.6_osmosis_xid_indexing.sql 100%[===============================================================================================>] 775 --.-KB/s in 0s
openstreetmap-# \di
List of relations
Schema | Name | Type | Owner | Table
--------+----------------------------------------------------------------+-------+----------+---------------------------
public | acls_k_idx | index | postgres | acls
public | acls_pkey | index | postgres | acls
public | ar_internal_metadata_pkey | index | postgres | ar_internal_metadata
public | changeset_comments_pkey | index | postgres | changeset_comments
public | changeset_tags_id_idx | index | postgres | changeset_tags
public | changesets_bbox_idx | index | postgres | changesets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Rub21
Rub21 / docker-cli-tips-and-tricks.md
Created August 21, 2018 15:00 — forked from BretFisher/docker-cli-tips-and-tricks.md
Docker CLI Tips and Tricks
@Rub21
Rub21 / Google protobuf installation on Mac
Last active February 19, 2018 13:58 — forked from rajkrrsingh/Google protobuf installation on Mac
Steps to Install google protobuf on Mac
wget https://github.com/google/protobuf/releases/download/v2.6.0/protobuf-2.6.0.tar.bz2
tar xvf protobuf-2.6.0.tar.bz2
cd protobuf-2.6.0
./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
make -j 4
sudo make install
protoc --version
@Rub21
Rub21 / python_environment_setup.md
Created January 17, 2018 14:37 — forked from wronk/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. That way you can keep each project in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. This intermediate guide covers one way to handle multiple Python versions and Python environments on your own (i.e., without a manager like Anaconda). See the Using the workflow section to view the end result.

Use cases

  1. Working on 2+ projects that each have their own dependencies; e.g., a Python 2.7 project and a Python 3.6 project, or developing a module that needs to work across multiple versions of Python. It's not reasonable to uninstall/reinstall modules every time you want to switch environments.
  2. If you want to execute code on the cloud, you can set up a Python environment that mirrors the relevant cloud