Install postgresql-9.4
$ sudo apt-get install postgresql-9.4
Then psql
version should be 9.4.x
$ psql --version
explain analyse | |
SELECT | |
SUM(vacations.daily_hours) AS daily_hours, | |
generate_series :: DATE AS date, | |
staff_memberships.user_id, | |
staff_memberships.account_id | |
FROM vacations | |
LEFT JOIN staff_memberships ON staff_memberships.id = vacations.staff_membership_id | |
CROSS JOIN generate_series( |
#include <MozziGuts.h> | |
#include <Oscil.h> | |
#include <tables/chum9_int8.h> // recorded audio wavetable | |
#include <tables/cos512_int8.h> // for filter modulation | |
#include <LowPassFilter.h> | |
#include <mozzi_rand.h> // for rand() | |
#include <EventDelay.h> // for scheduling events | |
#define CONTROL_RATE 64 // powers of 2 please |
{ | |
"aps": { | |
"alert": { | |
"title": "Test", | |
"body": "Test" | |
}, | |
"sound": "true", | |
"custom": { | |
"object_type": "Product", | |
"object": { |
--setwifi.lua | |
print("Entering wifi Setup..") | |
wifi.setmode(wifi.STATIONAP) | |
cfg={} | |
cfg.ssid="LeakSensor" | |
--cfg.password="12345678" --comment to leave open | |
wifi.ap.config(cfg) |
#include <MIDI.h> | |
#include <SoftwareSerial.h> | |
#include <DFPlayer_Mini_Mp3.h> | |
#include <math.h> | |
SoftwareSerial mySerial(11, 10); // RX, TX | |
MIDI_CREATE_DEFAULT_INSTANCE(); | |
bool isMp3Mode = false; |
users: | |
- 1: | |
name: 'djiowdjeiow' | |
activity_id: 1 | |
discount_ids: | |
- 1 | |
- 2 | |
account: | |
id: 1 | |
accounts: |
check process puma_web | |
with pidfile /home/deploy/rails_apps/store/shared/tmp/pids/puma_web.pid | |
if totalmem is greater than 1024 MB for 1 cycles then alert | |
if totalmem is greater than 1024 MB for 2 cycles then | |
exec "/bin/bash -c '/sbin/restart store-puma-web'" as uid root and gid root | |
check process puma_api | |
with pidfile /home/deploy/rails_apps/store/shared/tmp/pids/puma_api.pid | |
if totalmem is greater than 512 MB for 1 cycles then alert | |
if totalmem is greater than 512 MB for 2 cycles then |
SELECT row_to_json(fc) | |
FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features | |
FROM (SELECT 'Feature' As type | |
, ST_AsGeoJSON(lg.area)::json As geometry | |
, row_to_json((SELECT l FROM (SELECT id, name) As l | |
)) As properties | |
FROM geofences As lg ) As f ) As fc; |