Author:
erics , April 22nd, 2016
If when trying to use SVG as an image <img src=”image.svg”> or as a CSS background-image, the browser doesn’t display it, your web host is probably serving the SVG with the wrong content-type. Add this to your web server config or .htaccess file: AddType image/svg+xml .svg .svgz
Categories: How-To's , Technology Tags: .htaccess , apache , Background , Content , Content-Type , CSS , howto , html , Image , img , SVG , tips , Type , Web , Web server , XML
| No comments
Author:
erics , October 27th, 2011
Your mileage may vary widely…
export AWS_CREDENTIALS_FILE = / root / aws / aws - credentials
mkdir / opt / aws / bin
cd / opt / aws / bin
wget http : //aws-catalog-download-files.s3.amazonaws.com/AmazonSES-2011-07-21.zip
unzip AmazonSES - 2011 - 07 - 21.zip
CentOS
yum install libxml2 - devel
Ubuntu
apt - get install gcc
apt - get install libssl - dev
apt - get install libxml2 - dev
apt - get install libio - socket - ssl - perl
apt - get install libnet - ssleay - perl
apt - get install libnet - https - any - perl
apt - get install liblwp - useragent - determined - perl
For all OS
cpan CPAN YAML Digest :: SHA URI :: Escape Bundle :: LWP MIME :: Base64 Crypt :: SSLeay XML :: LibXML LWP :: Protocol :: https
perl - e 'print "@INC;\n";'
cp SES . pm { one path from above command }
/ opt / aws / bin / ses - verify - email - address . pl - l
Categories: How-To's , Technology Tags: Amazon , apt-get , AWS , CPAN , howto , perl , SES , Simple Email Service , tips , XML , Yum
| No comments
Author:
erics , August 3rd, 2011
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl -w
use XML:: Simple ;
use Data:: Dumper ; # used for debugging the XML
use DBI ;
use DBIx:: SQLEngine ;
use strict ;
# Use KeyAttr to massage the xml into a proper hash
my $xs = XML:: Simple-> new ( KeyAttr = > { value = > 'type' } , forcearray = > [ 'value' ] ) ;
my $parsed ;
eval {
$parsed = $xs -> XMLin ( $xml ) ;
1;
} or do {
die "Error loading xml: $@" ;
} ;
#print Dumper $parsed; # DEBUG to see parsed XML
my $dsn = join ( ':' , qw ( DBI mysql { DATABASE_NAME } localhost 3306 ) ) . ':' ;
my $dbh = DBIx:: SQLEngine-> new ( $dsn , '{MYSQL_LOGIN}' , '{PASSWORD}' ) || die "Database connection Error: $DBI::errstr\n" ;
my $rows = $parsed -> { 'item' } ;
eval {
$dbh -> do_bulk_insert (
'table' = > 'myTable' ,
'values' = > $rows ,
) ;
1;
} or do {
die qq | SQL do_bulk_insert Crashed : $ @ | ;
} ;
exit 0;
Categories: How-To's , Technology Tags: mysql , perl , XML
| No comments