All sizes in MB, change /1024/1024 to /1024/1024/1024 for GB.
Without system databases
select
datname as database,
(pg_database_size(datname)/1024/1024) as size| /* | |
| * derivative work of Matheus de Oliveira's json_manipulator.sql | |
| * https://gist.github.com/matheusoliveira/9488951 | |
| * | |
| * adapted to support postgresql 9.4 jsonb type | |
| * no warranties or guarantees of any kind are implied or offered | |
| * | |
| * license is as Matheus conferred it on 4/9/2015: | |
| * matheusoliveira commented on Apr 9 | |
| * @hannes-landeholm, I'd like to take credit if you share them |
| if Rails.env.test? | |
| # inspired by Braintree's original WebhookTestingGateway, but with way more flexibility and complete data | |
| class BraintreeWebhookTestingGateway | |
| class << self | |
| def register_notification(identifier, kind = nil, &builder) | |
| @notifications ||= {} | |
| kind ||= identifier | |
| @notifications[identifier] = [kind, builder] | |
| end |
| <?php | |
| public function process(ContainerBuilder $container) | |
| { | |
| $factory = $container->findDefinition('app.doctrine.repository.factory'); | |
| $repositories = []; | |
| foreach ($container->findTaggedServiceIds('app.repository') as $id => $params) { | |
| foreach ($params as $param) { | |
| $repositories[$param['class']] = $id; |
| CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json) | |
| RETURNS json | |
| IMMUTABLE | |
| LANGUAGE sql | |
| AS $$ | |
| SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json | |
| FROM ( | |
| SELECT * FROM json_each(data) | |
| UNION ALL | |
| SELECT * FROM json_each(insert_data) |
| // Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
| // Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
| var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
| // For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
| var reqUrl = url.parse(req.url, true) | |
| var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
| if (cameraName) { | |
| try { | |
| cameraName = decodeURIComponent(cameraName); |
| #!/usr/bin/perl | |
| use Mysql; | |
| use strict; | |
| use vars qw($school_name); | |
| use vars qw($pass); | |
| require "./cgi-lib.pl"; |
false as "0", so you want to typecast them.$hidden array then OOPS!/users/id/5/active/true. Your API does not need to be SEO optimised.?format=xml is stupid, use an Accept: application/xml header. I added this to the CodeIgniter Rest Server once for lazy people, and now people think it's a thing. It's not.