Skip to content

Instantly share code, notes, and snippets.

View VMBindraban's full-sized avatar

Vijay Bindraban VMBindraban

  • Netherlands
View GitHub Profile
function isValidDate(date) {
var day = date.substr(0, 2),
month = date.substr(3, 2),
year = date.substr(6, 4);
return !(
(month < 1 || month > 12) ||
(day < 1 || day > 31) ||
((month == 4 || month == 6 || month == 9 || month == 11) && day > 30) ||
(month == 2 && day > 29) ||
@VMBindraban
VMBindraban / app.js
Created December 9, 2015 13:13
Resize/crop/center in javascript through canvas to base64
var $uplImageBtn = $('.pui--ev-upload'),
$uplContainer = $('#uplProfileImg'),
$previewImg = $('.macc--s-pimg img');
$uplImageBtn.click(function() {
$uplContainer.trigger('click');
});
$uplContainer.on('change', function() {
if (!this.files && !this.files[0]) {
@VMBindraban
VMBindraban / varnish-cheatcheet.md
Last active September 5, 2020 22:49
Varnish 3 cheatsheet

###Some don't work yet.

Get the top request methods

varnishtop -i RxRequest

Top urls that missed the cache.

varnishtop -i TxURL

@VMBindraban
VMBindraban / Islive API.md
Last active December 29, 2020 10:52
Korte handleiding voor het gebruikt van http://www.islive.nl/api

Available Arguments

Updated: 5th of May 2017

Fetch minimal

Use fetch=minimal to retrieve the following pre-defined properties: modelnaam,taal0,taal1,taal2,geslacht,decency,available_contact,online,leeftijd,waardering,uiterlijk,woonplaats,land.

Example: ?fetch=minimal

Fetch full

Use fetch=full to retrieve the following pre-defined properties: