Getting started:
Related tutorials:
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install [email protected] | |
| brew unlink [email protected] | |
| brew link postgresql |
| #!bin/sh | |
| # Update installed packages and package cache | |
| sudo yum update -y | |
| # make sure in the home folder | |
| cd ~/ | |
| # Golang installation |
Getting started:
Related tutorials:
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
Alter the port the script talks to from 8000 to 80:
}).listen(80);
This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresqlThe top of what gets printed as a result is the most important:
| <?php | |
| require_once dirname(__FILE__) . '/../lib/simpletest/autorun.php'; | |
| // Retries $f (A function) with arguments ($args as array) | |
| // 3 ($retries) times after 10 secs $delay | |
| // Usage: | |
| // retry( 'function_name', array('arg1', 'arg2'), 15, 5 ); | |
| // #=> Retries function_name 5 times with arg1 and $arg2 as arguments at interval of 15 secs | |
| function retry($f, $args = null, $delay = 10, $retries = 3) | |
| { |
| ALPHABET_SIZE = 26 | |
| def caesar_cipher(string) | |
| shiftyArray = [] | |
| charLine = string.chars.map(&:ord) | |
| shift = 1 | |
| ALPHABET_SIZE.times do |shift| | |
| shiftyArray << charLine.map do |c| | |
| ((c + shift) < 123 ? (c + shift) : (c + shift) - 26).chr |