# Kinsta Deployment through Github Actions for Bedrock/Sage. | |
# | |
# Placed at: .github/workflow/deploy.yml | |
# | |
# Process should be studied from code, but some quick brief: | |
# - runs composer / sage installation | |
# - moves correct `.env.*` file for multiple configs | |
# - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there | |
# - symlinks uploads folder and symlink release folder to kinsta public hostname | |
# - if you want to clear cache, please uncomment the last job |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
Our database has fast rate of transactions. I did think, that such rate is impossible, until I've seen it with my eyes. I've been instinctively insisting on fixing code to reduce number of transactions (sometimes successful), but never checked what are consequences for database.
One of consequences is fast rate of autovacuum VACUUM FREEZE.
VACUUM is essential for Postgresql to mark non-visible rows (those which were normal rows, but became invisible because of update or delete) as visible to PG. Note, that they become visible only to PG, previously PG didn't know they are free for use, and thus had allocated extra buffers in the end of a table for any new rows (inserts or updates). PG not knowing which rows are free for use is another problem, which causes table bloat, which deserves another post.
VACUUM FREEZE is special kind of VACUUM. From resource usage perspective, it differs from VACUUM by that it has to scan full table (normal VACUUM processes only buffers known to contain at
Moved to https://github.com/ebidel/puppeteer-examples |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
# Assumes the database container is named 'db' | |
DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
DB_HOSTNAME=db | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="path/to/local.dump" | |
docker-compose up -d db | |
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop db |
This blog post has helped me clean up my postgres development environment on Mac. So making a copy!
How completely uninstall PostgreSQL 9.X on Mac OSX
This article is referenced from stackoverflow:
If installed PostgreSQL with homebrew , enter brew uninstall postgresql
If you used the EnterpriseDB installer , follow the following step.
var lastScrollTop = 0; | |
$(window).scroll(function(event){ | |
var st = $(this).scrollTop(); | |
if (st > lastScrollTop){ | |
// downscroll code | |
} else { | |
// upscroll code | |
} | |
lastScrollTop = st; | |
}); |
/*! | |
* Copyright 2015 Google Inc. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |