Não use UUID como PK nas tabelas do seu banco de dados.
| Prefix | Description | Notes | |
|---|---|---|---|
| ac_ | Platform Client ID | Identifier for an auth code/client id. | |
| acct_ | Account ID | Identifier for an Account object. | |
| aliacc_ | Alipay Account ID | Identifier for an Alipay account. | |
| ba_ | Bank Account ID | Identifier for a Bank Account object. | |
| btok_ | Bank Token ID | Identifier for a Bank Token object. | |
| card_ | Card ID | Identifier for a Card object. | |
| cbtxn_ | Customer Balance Transaction ID | Identifier for a Customer Balance Transaction object. | |
| ch_ | Charge ID | Identifier for a Charge object. | |
| cn_ | Credit Note ID | Identifier for a Credit Note object. | 
| <?php | |
| function camel_to_snake($input) | |
| { | |
| return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $input)); | |
| } | |
| function snakeToCamel($input) | |
| { | |
| return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input)))); | |
| } | 
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
- Host a static website at S3
- Redirect www.website.comtowebsite.com
- Website can be an SPA (requiring all requests to return index.html)
- Free AWS SSL certs
- Deployment with CDN invalidation
| <?php | |
| /** | |
| * page full capture for https://github.com/facebook/php-webdriver | |
| * | |
| * @param RemoteWebDriver $driver | |
| * @param string $screenshot_name capture save path | |
| * @throws Exception | |
| */ | |
| public function takeFullScreenshot($driver, $screenshot_name) | 
The connection failed because by default psql connects over UNIX sockets using peer authentication, that requires the current UNIX user to have the same user name as psql. So you will have to create the UNIX user postgres and then login as postgres or use sudo -u postgres psql database-name for accessing the database (and psql should not ask for a password).
If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres (as pointed out by @meyerson answer) will solve your immediate problem.
But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf* line:
from
| #!/usr/bin/env groovy | |
| @Grab(group='com.github.jknack', module='handlebars', version='4.0.3') | |
| @Grab(group='org.yaml', module='snakeyaml', version='1.16') | |
| @Grab(group='org.slf4j', module='slf4j-simple', version='1.7.14') | |
| import org.yaml.snakeyaml.Yaml; | |
| import com.github.jknack.handlebars.Handlebars; | |
| import com.github.jknack.handlebars.Template; | 
| ## I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot). | |
| ## I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands | |
| ## came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files | |
| # See the unwanted files: | |
| git ls-files -ci --exclude-standard | |
| # Remove the unwanted files: | |
| git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached | 
A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.
Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.
This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.