Skip to content

Instantly share code, notes, and snippets.

View arion's full-sized avatar

Abushaev Denis arion

View GitHub Profile
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
@arion
arion / config
Created September 22, 2016 08:38
users:
- 1:
name: 'djiowdjeiow'
activity_id: 1
discount_ids:
- 1
- 2
account:
id: 1
accounts:
#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;
--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)
{
"aps": {
"alert": {
"title": "Test",
"body": "Test"
},
"sound": "true",
"custom": {
"object_type": "Product",
"object": {
#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
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(