...will tunnel HTTP requests to one given domain and port through an intermediary SSH server: ssh -L 8080:targethost:80 tunnelhost http://localhost:8080 will now connect you to...
fake_stripe spins up a local server that acts like Stripe’s and also serves a fake version of Stripe.js, Stripe’s JavaScript library that allows you to collect your...
...customers’ payment information without ever having it touch your servers. It spins up when you run your feature specs, so that you can test your purchase flow without hitting Stripe...
...more information, see the linked page. cap invoke To run shell commands on all servers, you can also use Capistrano's invoke. Its syntax is a bit more complicated:
Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting them first. It may break horribly for you. This is...
...apt-get install pv Know the location of the dump file on the remote server. We'll use /mnt/dumps/my_project.dump.bz2 in the example below. Find out the size of the (bzipped...
...your keyring or ssh-agent. Your ssh-agent will throw all keys against a server until one matches. Most servers will deny access after 5 attempts. This issue might come...
You can use gem list to list all gems available from a remote gem server: gem list -r --clear-sources -s 'https://user:password@gemserver.tld/' This is useful to debug cases...
...Saving files to a directory that is not shared between deploys or servers If you save your uploads to a made up directory like "RAILS_ROOT/uploads", this directory goes away...
...every release gets a new). Also this directory is not shared between multiple application servers, so your uploads are randomly saved to one local filesystem or another. Fixing this afterwards...
If you are a makandra employee and are running your app on makandra servers, you can skip this step. All servers and developer machines at makandra are already configured...
...is not gitignored, or your changes are only valid for your machine, not any servers. Inside a Docker environment, this file might be ignored. How to fix. Globally:
...character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | latin1 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.01 sec...
...default-character-set is not valid and you need to use character-set-server instead. Check you error log if mysql start leads to a timeout. After this check if...
...version of net-ssh which is used by Capistrano to connect to your remote servers. From time to time, crypto ciphers used by SSH are removed (on servers) because of...
...with such an old cipher, you will see a error like that on your server: fatal: Unable to negotiate with 1.2.3.4 port 52296: no matching cipher found. Their offer: aes256...
Microsoft Exchange service administrators can enable Exchange Web Services (EWS) which is a rather accessible XML API for interacting with Exchange. This allows you to read and send e-mails...
...what you can do with EWS, with accompanying Viewpoint code. Connecting to an exchange server require 'viewpoint' include Viewpoint::EWS endpoint = 'https://your.exchange.server/ews/Exchange.asmx' user = 'your-user' pass = 'your-password...
If your requests blow up in Ruby or CURL, the server you're connecting to might only support requests with older SSL/TLS versions. You might get an error like: OpenSSL...
...SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=unknown state SSL Server Test This SSL Server Test can help finding out which SSL/TLS versions the server can handle...
...quite annoying when you have multiple deployment targets with different hostnames, e.g. a staging server and a production server. Using the hack below you don't need to configure default...
...request.protocol ActionMailer::Base.default_url_options[:host] = request.host_with_port end end If your application server talks only HTTP and relies on the web server for SSL, and if the web...
When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic information. Because all Unpoly updates work using AJAX requests, you...
...need to update the isDevelopmentError() function so it returns true when your particular development server shows an error. Warning Unpoly cannot repeat form submissions that include file inputs. If it...
...trusted, secure machine only. Usually this is your production environment. Run this on the server (not on your machine) as root.\ Replace your-domain.tld with the domain you request the certificate...
...media to your SSL dealer. The key should never be transfered away from the server...
...make two requests for every page. The browser will first request /foo, then the server will return a redirect to /foo/ (mind the trailing slash), then the browser makes a...
...retrieve the actual HTML. You can probably fix this by configuring your static web server. What we want is: Accessing /foo should directly return the content of /foo/index.html without a...
Call with the server's hostname (and user if you have no SSH agent), e.g. install-gems-remotely my.server.com # or without agent: install-gems-remotely me@my.server.com When you call it...
...as the gemspecs of all vendored gems in to a temporary folder on the server and does a bundle install there. If you need to install gems from anothere Gemfile...
...send a local file to the browser, you can save resources on the application server by setting the :x_sendfile option to true. This option is activated by default for...
...applications can be used by multiple users at the same time. A typical application server like Passenger has multiple worker processes for a single app. In a distributed deployment setup...
...like we use at makandra you will even have multiple application servers, each with their own worker pool. This means that your code needs to deal with concurrent data access...
If you have different users for different servers, don't use set :user. Encode the username into the server definition instead: server "username@servername.tld", :app, :web, :cron, :db, :primary => true
Connect to your IMAP server. If you have SSL enabled: openssl s_client -connect your-server:993 if your server supports STARTTLS: openssl s_client -starttls imap -connect your-server...
...log into IMAP, send the following string (incl. "01"!): 01 LOGIN user@domani.io $password The server should return something like: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR ... 01 OK Logged in
...adding gems, it starts to take really long to start up, be it the server, console or just running a single spec. Zeus is smart, you don’t have to...
...do is create a JSON config file via zeus init and then start the server zeus start. After that, you’re ready to go, all you need to do is...
You probably already manage servers you often connect to inside the ~/.ssh/config file. What is nice: you may define alias names for hosts so that you can say something like...
...ssh foobar-staging. This is especially helpful for servers whose hostnames are hard to remember or who don't have a DNS record at all (and must be accessed via...
Install OpenSSH Server: sudo apt-get install openssh-server To check if the server is running you should get no error when you restart it: sudo /etc/init.d/ssh restart
...ssh server is ready to use. To add additional security edit your sshd_config (gksudo gedit /etc/ssh/sshd_config): # Deny root login: PermitRootLogin no # To whitelist users: AllowUsers USERNAME1 USERNAME2