Skip to content

Instantly share code, notes, and snippets.

View Carmageddon's full-sized avatar

Genadi Saltikov Carmageddon

  • Sametrica
  • Halifax
View GitHub Profile
@Carmageddon
Carmageddon / docker-compose.yml
Created March 11, 2024 03:22 — forked from spikegrobstein/docker-compose.yml
docker-compose file for sabnzbd/sonarr/radarr
# start up with 'docker-compose up -d' to start in background
# update images with 'docker-compose pull'
# this assumes that you have a sibling directory to this file called 'config' that contains all of the config for these services
# you can reference 'sabnzbd' 'radarr' or 'sonarr' from inside the containers (in the apps) to reference the other containers. no need to deal with IPs or hostnames
# remember that docker is isolated from the rest of your filesystem. you need to add volumes to the entries
# in order to give the processes access to them. so if you have multiple target directories for TV or Movies,
# then make sure you add each one that you want radarr/sonarr/sabnzbd to see.
version: '3'
services:
@Carmageddon
Carmageddon / gist:41134b3c52ef3a6b531e528997842606
Last active February 8, 2022 17:52
flash-all Pixel 2XL Taimen taimen-rp1a.201005.004.a1
Sending 'bootloader_b' (36356 KB) OKAY [ 0.789s]
Writing 'bootloader_b' OKAY [ 0.366s]
Finished. Total time: 1.169s
Rebooting into bootloader OKAY [ 0.000s]
Finished. Total time: 0.003s
Sending 'radio_b' (60388 KB) OKAY [ 1.312s]
Writing 'radio_b' OKAY [ 0.573s]
Finished. Total time: 1.896s
Rebooting into bootloader OKAY [ 0.000s]
Finished. Total time: 0.004s
root@Dev:~ # pg_restore -h localhost -U superuser -d postgres -C Room-DB
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3700; 1262 16384 DATABASE room postgres
pg_restore: [archiver (db)] could not execute query: ERROR: role "postgres" does not exist
Command was: ALTER DATABASE room OWNER TO postgres;
pg_restore: [archiver (db)] Error from TOC entry 7; 2615 34105 SCHEMA tiger postgres
pg_restore: [archiver (db)] could not execute query: ERROR: role "postgres" does not exist
Command was: ALTER SCHEMA tiger OWNER TO postgres;
root@Dev:~ # pg_restore -h localhost -U superuser -d postgres -C Room-DB
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3700; 1262 16384 DATABASE room postgres
pg_restore: [archiver (db)] could not execute query: ERROR: database "room" already exists
Command was: CREATE DATABASE room WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
pg_restore: [archiver (db)] could not execute query: ERROR: role "postgres" does not exist
Command was: ALTER DATABASE room OWNER TO postgres;
@Carmageddon
Carmageddon / gist:3b82d262bd739138dbcc
Created March 18, 2015 21:01
Raw parametarized query
$results = DB::select( DB::raw('SELECT "Subscription".*
FROM "Subscription"
JOIN "Account" ON "Subscription"."AccountID" = "Account"."AccountID"
JOIN "PayTool" ON "Subscription"."AccountID" = "PayTool"."OwnerAccountID"
JOIN "Plan" ON "Subscription"."PlanID" = "Plan"."PlanID"
WHERE
(
(
("AdminPhNumber" = \':cellnum\' AND "AdminPhAreaCode" = \':CellArea\') OR ("BillPhNumber" = \':cellnum\' AND "BillPhAreaCode" = \':CellArea\') or ("TechPhNumber" = \':cellnum\' AND "TechPhAreaCode" = \'CellArea\') OR ("PersPhNumber" = \':cellnum\' AND "PersPhAreaCode" = \'CellArea\')
OR
@Carmageddon
Carmageddon / gist:e108253f3878f153baa1
Last active August 29, 2015 14:17
Sample query for Eloquent
SELECT "Subscription".*
FROM "Subscription"
JOIN "Account" ON "Subscription"."AccountID" = "Account"."AccountID"
JOIN "PayTool" ON "Subscription"."AccountID" = "PayTool"."OwnerAccountID"
WHERE
(
(
("AdminPhNumber" = '4578568' AND "AdminPhAreaCode" = '54') OR ("BillPhNumber" = '4578568' AND "BillPhAreaCode" = '54') or ("TechPhNumber" = '4578568' AND "TechPhAreaCode" = '54') OR ("PersPhNumber" = '4578568' AND "PersPhAreaCode" = '54')
OR
("AdminFaxNumber" = '4578568' AND "AdminFaxAreaCode" = '54') OR ("BillFaxNumber" = '4578568' AND "BillFaxAreaCode" = '54') or ("TechFaxNumber" = '4578568' AND "TechFaxAreaCode" = '54') OR ("PersFaxNumber" = '4578568' AND "PersFaxAreaCode" = '54')
var planOptions = [
{
group:"MailServices",
plans: [
{
Name: "Exchange",
PlanID: 8446,
PeriodID: 6666,
OptionalResources:
[