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
function sanitize_email( $content ) { | |
$data = array(); | |
foreach ( ( explode(' ',$content) ) as $address) { | |
$email = filter_var($address,FILTER_VALIDATE_EMAIL); | |
if ( $email ) { | |
$email = preg_replace('/\./', '[dot]', $email); | |
$email = preg_replace('/\@/', '[at]', $email); | |
$data[] = $email; | |
} | |
else { |
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 Model::Calculation::PhysicalActivity; | |
use Dancer ':syntax'; | |
use Dancer::Plugin::DBIC; | |
use Moose; | |
use Data::Dumper; | |
use Model::Response; |
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
// flash app needs time to load and initialize | |
if (RecorderFlash.recorder && RecorderFlash.recorder.init) { | |
RecorderFlash.recorderOriginalWidth = RecorderFlash.recorder.width; | |
RecorderFlash.recorderOriginalHeight = RecorderFlash.recorder.height; | |
if (RecorderFlash.uploadFormId && $) { | |
var frm = $(RecorderFlash.uploadFormId); | |
if (frm.size() > 0) { | |
RecorderFlash.recorder.configure(22,0,10,100); | |
RecorderFlash.recorder.setUseEchoSuppression('yes'); | |
RecorderFlash.recorder.init(frm.attr('action').toString(),RecorderFlash.uploadFieldName,frm.serializeArray()); |
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 | |
postconf -d >/root/postfix.defaults | |
postconf >/root/postfix.conf | |
diff -u /root/postfix.defaults /root/postfix.conf | grep -v '^ '|grep -v '^@' |grep -v '^---' | grep -v '^+++' |
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
#!/usr/bin/perl | |
# Have a look this for the problem | |
#https://docs.google.com/document/d/1TyPFlDh--yp5q_NPPHX_Yd1iuUhIoZOH0hHSTabqAZw/edit?hl=en_GB&pli=1 | |
use strict; | |
use warnings; | |
use Getopt::Std; | |
use DateTime; |
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 User; | |
use Moose; | |
use TypeConstraints qw/Gender DOB MySQLTimestamp/; | |
use DateTime; | |
use Date::Manip; | |
use DateTime::Format::MySQL; | |
has '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
package Fullonsms::Message; | |
use Moose; | |
use Fullonsms::Util; | |
has 'receiver_mobile_no' => ( | |
is => 'rw', | |
isa => 'ArrayRef', | |
required => 1 | |
); |
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 Alert; | |
use Moose; | |
has 'type' => ( | |
is => 'ro', | |
isa => 'Str', | |
required => 1, | |
); |
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 Way2sms; | |
use Moose; | |
use LWP::UserAgent; | |
use HTTP::Cookies; | |
has 'username' => ( | |
is => 'rw', | |
isa => 'Str', |
NewerOlder