Skip to content

Instantly share code, notes, and snippets.

View kfiil's full-sized avatar

Kenneth Fiil kfiil

View GitHub Profile
@kfiil
kfiil / filters.html
Created January 12, 2015 20:38
AngularJS kursus, filters
<input type="checkbox" ng-model="strict"><br>
<table id="searchObjResults">
<tr><th>Name</th><th>Phone</th></tr>
<tr ng-repeat="friendObj in friends | filter:search:strict">
<td>{{friendObj.name}}</td>
<td>{{friendObj.phone}}</td>
</tr>
</table>
@kfiil
kfiil / removeElementFromArray.js
Created July 22, 2014 06:49
Remove specific element from an array in #JavaScript
//Credit http://stackoverflow.com/a/5767357
var array = [2, 5, 9];
var index = array.indexOf(5);
if (index > -1) {
array.splice(index, 1);
}
@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;