From: https://stackoverflow.com/questions/26596566/postgres-database-locked-queries-running-forever
You should check for locks:
SELECT l.*,a.*
FROM pg_locks l
JOIN pg_stat_activity a USING (pid)
WHERE NOT granted;
| #!/usr/bin/env bash | |
| # Abort sign off on any error | |
| set -e | |
| # Start the benchmark timer | |
| SECONDS=0 | |
| # Repository introspection | |
| OWNER=$(gh repo view --json owner --jq .owner.login) |
| import { Controller } from "@hotwired/stimulus" | |
| import SignaturePad from 'signature_pad' | |
| export default class extends Controller { | |
| static targets = ["canvas", "input"] | |
| connect() { | |
| this.signaturePad = new SignaturePad(this.canvasTarget) | |
| this.signaturePad.addEventListener("endStroke", this.endStroke) | |
| this.resizeCanvas() | |
| if (this.inputTarget.value) { |
From: https://stackoverflow.com/questions/26596566/postgres-database-locked-queries-running-forever
You should check for locks:
SELECT l.*,a.*
FROM pg_locks l
JOIN pg_stat_activity a USING (pid)
WHERE NOT granted;
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git
| # Run In Console | |
| rails g model Foo | |
| rails g scaffold_controller Admin::Foo --model-name=Foo | |
| # Generates | |
| # db/migrate/20160907201951_create_foo.rb | |
| # app/models/foo.rb | |
| # app/controllers/admin/foo_controller.rb | |
| # app/views/admin/foo | |
| # app/views/admin/foo/index.html.erb |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
| var myScript = document.createElement('script'); | |
| myScript.src = 'http://code.jquery.com/jquery-2.1.4.min.js'; | |
| myScript.onload = function() { | |
| console.log('jQuery loaded.'); | |
| }; | |
| document.body.appendChild(myScript); |
| #installing node in a custom directory so you don't have to use sudo all the time | |
| #npm now comes with node, so no need to individually install it | |
| cd ~ | |
| mkdir local | |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.zshrc | |
| . ~/.zshrc | |
| cd local |