show dbs
In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.
- This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
- The client system must be able to reach the Vault server and the OpenSSH server.
- We will refer to these systems respectively as:
- VAULT_SERVER
This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.
Mongo Manual can help you with getting started using the Shell.
FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
## General Stuff | |
### List all tables | |
SELECT * FROM pg_catalog.pg_tables | |
### Create a new user and give it superuser access | |
CREATE USER adminuser createuser password '1234Admin'; | |
ALTER USER adminuser createuser; | |
### Create a user without superuser privilege |
-- Table information like sortkeys, unsorted percentage | |
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html | |
SELECT * FROM svv_table_info; | |
-- Table sizes in GB | |
SELECT t.name, COUNT(tbl) / 1000.0 AS gb | |
FROM ( | |
SELECT DISTINCT datname, id, name | |
FROM stv_tbl_perm | |
JOIN pg_database ON pg_database.oid = db_id |
#! /bin/sh | |
# This is just a stub for the Unix configure script, to provide support for | |
# doing "./configure" in the top Vim directory. | |
PY_CONFIG=`pyenv prefix 2.7.11/lib/python2.7/config` | |
PY3_PREFIX=`pyenv prefix 3.4.4` | |
PY3_CONFIG=`$PY3_PREFIX/bin/python-config --configdir` | |
cd src && exec ./configure \ |
#!/usr/bin/env python | |
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16""" | |
""" | |
Python is a cross-platform, interpreted, object-oriented programming language. | |
That means you can run it on Linux, Windows, Mac, and other platforms, | |
you don't need to compile your code to execute it because it is compiled on | |
the fly, and you can use classes and objects. |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
#!/bin/sh | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
aptitude -y purge ri | |
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |