Starting Vim
vim [file1] [file2] ...
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| from collections import defaultdict | |
| import boto3 | |
| """ | |
| A tool for retrieving basic information from the running EC2 instances. | |
| """ | |
| # Connect to EC2 | |
| ec2 = boto3.resource('ec2') |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
Magic words:
psql -U postgresSome 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)A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| #!/bin/sh | |
| # AUTHOR | |
| # DANIEL E. GILLESPIE (2016) | |
| # https://github.com/dantheman213 | |
| # DESCRIPTION | |
| # Export your app's table schemas and stored functions from a PostgreSQL | |
| # database into individual *.sql files for easy management and source control. |
| #!/bin/bash | |
| # | |
| # description: Apache Tomcat init script | |
| # processname: tomcat | |
| # chkconfig: 234 20 80 | |
| # | |
| # | |
| # Copyright (C) 2014 Miglen Evlogiev | |
| # | |
| # This program is free software: you can redistribute it and/or modify it under |
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |