This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
d.objid::regclass AS owning_object, | |
d.refobjid::regclass AS dependent_object, | |
a.attname AS dependent_column, | |
d.deptype -- The meaning of this type is documented at https://www.postgresql.org/docs/current/catalog-pg-depend.html | |
FROM pg_catalog.pg_depend d | |
LEFT JOIN pg_catalog.pg_attribute a ON d.refobjid = a.attrelid | |
AND d.refobjsubid = a.attnum | |
WHERE refobjid = '<table>'::regclass | |
AND a.attname = '<column>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
relname, | |
relfilenode | |
FROM pg_catalog.pg_class | |
WHERE relname in ( | |
'<table>', | |
'<index>' | |
) | |
-- Order by oid for convenience if you're checking multiple relations. | |
ORDER BY oid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
seq_scan, | |
seq_tup_read, | |
idx_scan, | |
idx_tup_fetch, | |
n_tup_ins, | |
n_tup_upd, | |
n_tup_del | |
FROM pg_catalog.pg_stat_user_tables | |
WHERE relname = '<table>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
psa.datname as database, | |
psa.query as current_query, | |
clock_timestamp() - psa.xact_start AS transaction_age, | |
array_agg(distinct c.relname) AS tables_with_locks | |
FROM pg_catalog.pg_stat_activity psa | |
JOIN pg_catalog.pg_locks l ON (psa.pid = l.pid) | |
JOIN pg_catalog.pg_class c ON (l.relation = c.oid) | |
JOIN pg_catalog.pg_namespace ns ON (c.relnamespace = ns.oid) | |
WHERE psa.pid != pg_backend_pid() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies = [ | |
('wagtailcore', '0040_page_draft_title'), | |
('wagtailredirects', '0006_redirect_increase_max_length'), | |
('wagtailcore', '0041_group_collection_permissions_verbose_name_plural'), | |
('wagtailforms', '0003_capitalizeverbose'), | |
('taggit', '0002_auto_20150616_2121'), | |
('wagtailimages', '0019_delete_filter'), | |
] | |
The dependencies are i'm assuming referencing the old way wagtai modules were named. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns railway-oriented-programming | |
"An adaptation of [Railway Oriented Programming](rop) using the | |
[Cats](cats) library in Clojure. | |
[rop]: http://fsharpforfunandprofit.com/posts/recipe-part2/ | |
[cats]: https://github.com/funcool/cats" | |
(:require [cats.builtin] | |
[cats.core :as cats] | |
[cats.monad.either :as either])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Ellie.Ui.CodeEditor | |
exposing | |
( Attribute | |
, LinterMessage | |
, Position | |
, Severity(..) | |
, linterMessages | |
, mode | |
, onChange | |
, readOnly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This is the Wikipedia entry example encoded graph. | |
(def graph {:orig [{:a 1.5 :d 2} 0] | |
:a [{:orig 1.5 :b 2} 4] | |
:b [{:a 2 :c 3} 2] | |
:c [{:b 3 :dest 4} 4] | |
:dest [{:c 4 :e 2} 0] | |
:e [{:dest 2 :d 3} 2] | |
:d [{:orig 2 :e 3} 4.5]}) | |
(defn a* [graph orig dest] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
http = :8000 | |
http-keepalive = 1 | |
http-auto-chunked = 1 | |
wsgi-file = config/wsgi_prod.py | |
master = true | |
processes = 8 | |
threads = 2 | |
enable-threads = True | |
gid = 2000 |
NewerOlder