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
create type queue_status as enum('new', 'inprogress', 'done'); | |
create table delivery_queue ( | |
delivery_id int not null primary key references dl (id) on delete cascade, | |
date_entered timestamp not null default current_timestamp, | |
status queue_status not null default '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
select n.id, | |
ml.cod, | |
us.cod as ini, | |
mn.nam, | |
ct.num, | |
nm.licence_text as rights, | |
nm.price fee, | |
n.quote_total as total, | |
n.quote_currency | |
from notes n |
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
· | |
*.tif │·························· | |
*-50mb.jpg │·························· | |
*-1mb.jpg │·························· | |
*-10mb.jpg │·························· | |
*-30mb.jpg |
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 | |
# | |
# simple pipe_address script to dump mails for 'juno-crm' into 'sirius2::juno/' rsyncd share for processing | |
# | |
# ( see: ansible:roles/rsyncd ) | |
# Revision: removed '--perm' arg. 1) it's --perms and 2) let the receiver manager perms | |
tmp="/tmp/juno_$$" | |
cat - | tee ${tmp} | head -n 5 | grep ' id' | awk '{ print $2 }' > ${tmp}_id |
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
<!doctype html><html style="margin: 0; padding: 0; width: 100%;"><head style=""> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title style="">Science Photo Library 105102</title> | |
<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG></o:AllowPNG><o:PixelsPerInch>96</o:PixelsPerInch></o:Off | |
iceDocumentSettings></xml><![endif]--> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" style="" type="text/css"> | |
<style style="" type="text/css"> | |
body, html{ | |
margin: 0; |
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; |
NewerOlder