Skip to content

Instantly share code, notes, and snippets.

View icydee's full-sized avatar

Iain C Docherty icydee

View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use IO::Socket::IP;
use Socket qw(SOCK_STREAM AF_INET6);
my $testserver = IO::Socket->new;
@icydee
icydee / affirmation
Created October 30, 2015 10:30
MuleSoft Contributor Agreement Acceptance by Iain C Docherty
I, Iain C Docherty, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Fri Oct 30 2015 10:30:27 GMT+0000 (GMT Standard Time)
@icydee
icydee / levenshtein comparitor
Created December 18, 2013 14:51
Compare two files to see how similar they are
use strict;
use warnings;
use Text::Levenshtein qw(distance fastdistance);
use File::Slurp;
use Digest::MD4 qw(md4_hex);
use Text::JaroWinkler qw(strcmp95);
my $i = 0;
my @checksum;
@icydee
icydee / login-radius-test
Created December 17, 2013 09:50
LoginRadius test script
<html>
<head>
<script src="https://hub.loginradius.com/include/js/LoginRadius.js" ></script>
<script src="js/libs/login-radius.js" type="text/javascript"></script>
<script type="text/javascript">
var options={};
options.login=true;
LoginRadius_SocialLogin.util.ready(function () {
@icydee
icydee / gist:7964576
Created December 14, 2013 20:33
RadiusLogin example
<html>
<head>
<script src="https://hub.loginradius.com/include/js/LoginRadius.js" ></script>
<script src="js/libs/login-radius.js" type="text/javascript"></script>
<script type="text/javascript">
var options={};
options.login=true;
LoginRadius_SocialLogin.util.ready(function () {
@icydee
icydee / gist:7913892
Created December 11, 2013 16:40
Running Perl in Safe Mode
use strict;
use warnings;
use lib "lib";
use Safe;
use Data::Dumper;
use Ar;
my $compartment = new Safe;
$compartment->permit(":load",qw(pack sort print));
@icydee
icydee / gist:7913720
Last active December 31, 2015 01:19
Redis as a Moose Attribute
package RedisTest;
use Moose;
use Redis;
use namespace::autoclean;
has 'id' => (
is => 'ro',
default => '945',
);
@icydee
icydee / gist:5408085
Created April 17, 2013 21:51
Firebase Person structure
{
"person" : {
"945" : {
"empire" : "icydee",
"on_line" : 0,
"alliance" : {
"name" : "Culture",
"id" : 26
}
},