This file contains hidden or 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
package MyApp::Schema::Result::Artist; | |
use warnings; | |
use strict; | |
use base qw( DBIx::Class::Core ); | |
__PACKAGE__->table('artist'); | |
__PACKAGE__->add_columns( |
This file contains hidden or 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
#!/opt/perl5/bin/perl | |
use v5.22; | |
use warnings; | |
use Crypt::CBC; | |
use MIME::Base64; | |
my $string = 'U2FsdGVkX18Hda5EdNIpyGFgLgJ1GRiZHUD/8NVKqe4='; | |
my $cipher = Crypt::CBC->new( |
This file contains hidden or 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
#!/bin/bash | |
PSQL="/usr/bin/psql" | |
PGUSER="dpaikkos" | |
DBNAME="import" | |
DUMP="sirius-latest.pg" | |
REMOTE="proxima" | |
rm -f $DUMP | |
/usr/bin/rsync -La --progress sirius:/data/pg_dumps/latest.pg ${DUMP} |
This file contains hidden or 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
/* Not creating a fk between spl_number and ct.num | |
as we may use pg_logical to replicate this table | |
to the PG DB on www. If we don't it will be trivial | |
to add one later. | |
Also not adding a unique key between md5 as there are | |
about 2,100 duplicates at the moment. | |
*/ | |
create table media_files( | |
spl_number varchar(9) not null, | |
pathpart varchar(64) not null, |
This file contains hidden or 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
set client_encoding='LATIN1'; | |
BEGIN; | |
DELETE FROM FIELDS WHERE NAME = 'CM.AG2'; | |
ALTER TABLE CM DROP COLUMN AG2; | |
COMMIT; | |
BEGIN; | |
DELETE FROM FIELDS WHERE NAME = 'CM.RG4'; | |
ALTER TABLE CM DROP COLUMN RG4; | |
COMMIT; | |
BEGIN; |
This file contains hidden or 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
-- Collect min and max date range | |
WITH range_values AS ( | |
SELECT date_trunc('month', min(dat)) as minval, | |
date_trunc('month', max(dat)) as maxval | |
from IV), | |
-- Generate date range in monthly intervals | |
months as ( | |
SELECT generate_series(minval, maxval, '1 month'::interval) as month | |
from range_values |
This file contains hidden or 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
#!/bin/bash | |
PSQL="/usr/bin/psql" | |
PGUSER="dpaikkos" | |
DBNAME="for_import" | |
DUMP="www-latest.pg" | |
REMOTE="proxima" | |
echo "Fetch $DUMP from $REMOTE" | |
rm -f $DUMP |
This file contains hidden or 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
ffmpeg -i /var/media/footage/k0/07/62/73/k0076273-hd.mov -v error -y -strict -2 -vcodec h264 -profile:v main -pix_fmt yuvj420p -crf 16 -movflags +faststart -b-pyramid none -weightp none -mixed-refs 0 -8x8dct 0 -trellis 0 -vf scale=384:-1 [scaled]; movie=/etc/perl/share/384x384wm_o36.png [logo]; [scaled][logo] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:rgb=1 [out] /tmp/k0076273-preview-wm.mp4 |
This file contains hidden or 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
#!/opt/perl5/bin/perl | |
use Linux::Inotify2; | |
use Path::Tiny; | |
use lib 'lib'; | |
use SPL::AppConfig 'conf'; | |
my $config = conf()->{'Model::DSS'}; | |
my $path = $config->{args}->{spool_dir} . '/mediasets'; |