This file contains 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
version: '3' | |
services: | |
database: | |
image: 'mongo' | |
container_name: 'my-mongo-container' # give your contatner a name | |
environment: | |
- MONGO_INITDB_DATABASE=your-database-name # database name you want to make | |
- MONGO_INITDB_ROOT_USERNAME=my-container-root-username # set your container root username | |
- MONGO_INITDB_ROOT_PASSWORD=secret # set your contatner root password | |
volumes: |
This file contains 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
# Fedora | |
# If you need an international version of Slack, use this URL: | |
# e.g. Korean: | |
# https://slack.com/intl/ko-kr/downloads/instructions/fedora | |
wget -q https://slack.com/downloads/instructions/fedora -O - \ | |
| tr "\t\r\n'" ' "' \ | |
| grep -i -o '<a[^>]\+href[ ]*=[ \t]*"\(ht\|f\)tps\?:[^"]\+"' \ | |
| sed -e 's/^.*"\([^"]\+\)".*$/\1/g' \ |
This file contains 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
import * as AWS from "aws-sdk" | |
export const getAMIImageID = async(imageName: string): Promise<string | undefined> => { | |
AWS.config.update({ region: "us-west-2" }) | |
const ec2 = new AWS.EC2() | |
// see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#describeImages-property | |
const params = { | |
Filters: [ | |
{ |
This file contains 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
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container-name |
This file contains 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
[Unit] | |
Description = Service to run Django API | |
After = network.target | |
[Service] | |
EnvironmentFile = /etc/bank/environment | |
User = deploy | |
ExecStart = /usr/local/bin/start_api.sh | |
[Install] |
This file contains 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
import sshClient from 'ssh2-promise' | |
const config = { | |
database: { | |
host: process.env.DB_HOST, | |
username: process.env.DB_USER, | |
password: process.env.DB_PASSWORD, | |
port: process.env.DB_PORT, | |
databaseName: process.env.DB_NAME, | |
}, |
This file contains 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 | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") | |
# Given a stream of crontab lines, exclude non-cron job lines, replace |
This file contains 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 | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
ANACRONTAB='/etc/anacrontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") |
- There are a lot different things you can try to keep pull requests manageable.
- These pointers are not meant to be rules, but merely guidelines when possible. Due to the nature of what you are working on, some of these techniques may not be possible (or incredibly difficult).
- Either way, here are some tips to help make people not want to claw their eyes out reviewing a pull request.
- These are the fundamental basics to a pull request and ALL pull requests should have these, regardless of how small or meaningless it is.