Sergey Romanov Serhioromano
-
Mighty Technologies Pvt
- International
- Sign in to view email
- http://www.mighty-technologies.com
View calendar.js
Date.prototype.getWeek = function() { | |
var first = new Date(this.getFullYear(), 0, 1); | |
return Math.ceil((((this.getTime() - first.getTime()) / 86400000) + first.getDay() + 1) / 7); | |
} | |
var date = new Date(); | |
console.log(date.getWeek()); |
View paypal.php
public function decodePayPalIPN() | |
{ | |
$raw = file_get_contents("php://input"); | |
// sometimes we already have & in returnUrl or cancelUrl | |
$raw = str_replace("&", '^^^', $raw); | |
$post = array(); | |
$pairs = explode('&', $raw); | |
foreach($pairs as $pair) | |
{ |
View calendar.js
Date.prototype.getMonthFormatted = function() { | |
var month = this.getMonth() + 1; | |
return month < 10 ? '0' + month : month; | |
} | |
Date.prototype.getDateFormatted = function() { | |
var date = this.getDate(); | |
return date < 10 ? '0' + date : date; | |
} | |
var date = new Date(); |
View tmpl.js
window.renderTemplate = function(name, el, json) | |
{ | |
var url = '/templates/' + name + '.html'; | |
$.ajax({ | |
url: url, | |
method: 'GET', | |
async: false, | |
dataType: 'html', | |
success: function(data) { | |
var tmpl = _.template(data); |
View backup.php
#!/usr/bin/php -q | |
<?php | |
date_default_timezone_set('UCT'); | |
$dryrun = FALSE; | |
$interval = '24 hours'; | |
$keep_for = '10 Days'; | |
$volumes = array('vol-9677d14a'); | |
$api_key = 'AKI****EYUA'; | |
$api_secret = 'IzMni****ct'; |