Skip to content

Instantly share code, notes, and snippets.

View dilanWijerathne's full-sized avatar

Dilan Wijerathne dilanWijerathne

  • Sri Lanka Association for Artificial Intelligence (SLAAI)
  • Colombo
View GitHub Profile
@dilanWijerathne
dilanWijerathne / AESEncryptor.php
Created July 21, 2016 08:21 — forked from Halama/AESEncryptor.php
AES Encryption with PKCS7 padding in PHP
<?php
/**
* AES Encryption with PKCS7 padding http://en.wikipedia.org/wiki/Padding_(cryptography)#PKCS7
* https://gist.github.com/RiANOl/1077723
* http://php.net/manual/en/function.mcrypt-encrypt.php
* http://stackoverflow.com/questions/7448763/proper-php-mcrypt-encryption-methods
*
* User: martinhalamicek
* Date: 7/8/13
* Time: 3:06 PM
@dilanWijerathne
dilanWijerathne / DRP Example 4.js
Created February 2, 2016 06:42 — forked from dangrossman/DRP Example 4.js
DRP Example 4.js
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>&nbsp;
<span></span> <b class="caret"></b>
</div>
<script type="text/javascript">
$(function() {
function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));