├── bin
│ └── console
├── config
│ └── evil_martians_api.yml
├── lib
│ ├── evil_martians_api
│ │ ├── api
│ │ │ └── developers.rb
│ │ ├── client
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
# frozen_string_literal: true | |
# A VCR trick to include preparation and cleanup phases for external services | |
# directly within the test files (the phases run ONLY when recording cassettes): | |
# | |
# RSpec.describe EvilMartiansAPI::Client, vcr: true do | |
# let(:client) { described_class.new } | |
# | |
# let(:developer_team_number) { 42 } | |
# |
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 | |
CLUSTER="cluster-name" | |
SERVICE="service/service-name" | |
last_parameter=${@:$#} # last parameter | |
other_parameters=${*%${!#}} # all parameters except the last | |
helpFunction() | |
{ |
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=Puma Rails Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/home/deploy/app/current | |
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb | |
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop |
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
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent
Let's say alice
is a github.com user, with 2 or more private repositories repoN
.
For this example we'll work with just two repositories named repo1
and repo2
https://github.com/alice/repo1
https://github.com/alice/repo2
You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
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
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr | |
http://support.godaddy.com/help/article/3601/generating-a-certificate-signing-request-nginx | |
http://support.godaddy.com/help/article/4976/rekeying-an-ssl-certificate | |
# Be sure to remember to chain them! | |
cat gd_bundle-g2-g1.crt >> yourdomain.crt | |
# Move 'em | |
sudo mv yourdomain.crt /etc/ssl/certs/yourdomain.crt |
NewerOlder