Skip to content

Instantly share code, notes, and snippets.

View kfiil's full-sized avatar

Kenneth Fiil kfiil

View GitHub Profile
@kfiil
kfiil / vertically-align-image
Last active August 29, 2015 14:00
Vertically align an image inside div
/*
Source http://stackoverflow.com/a/7310398
http://jsfiddle.net/kizu/4RPFa/74/
*/
.frame {
height: 25px; /* equals max image height */
width: 160px;
border: 1px solid red;
@kfiil
kfiil / WhitelistSantize.txt
Last active January 2, 2016 08:49
Whitelist santize with HtmlAgilityPack (#csharp)
https://htmlagilitypack.codeplex.com/discussions/24346
http://eksith.wordpress.com/2011/06/14/whitelist-santize-htmlagilitypack/
Web Protection
http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-2.html
http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
@kfiil
kfiil / setPristine.js
Last active December 30, 2015 22:19
Clearing a Form in AngularJS(1.2.x) (#JavaScript #AngularJS)
//Source http://blog.hugeaim.com/2013/04/07/clearing-a-form-with-angularjs/
//make the record pristine
$scope.commentForm.$setPristine();
$scope.comment = {..};