Skip to content

Instantly share code, notes, and snippets.

View mikedavies-dev's full-sized avatar

Mike Davies mikedavies-dev

View GitHub Profile
@mikedavies-dev
mikedavies-dev / gist:989dd86a1ace38a9ac58
Created May 27, 2015 09:40
A simple log file monitor class for .NET
/*
A simple log file monitor class for .NET
Uses a threaded timer to check for changes in the file, if the file length has changed then the unread
section of the file is read and parsed into lines before being passed back to the event handler.
Note, because the class uses the threaded timer callbacks on the event hander WILL be made form a
different thread, keep this in mind when using the class.
@amergin
amergin / angular-packery.js
Created August 6, 2014 00:24
Angular-masonry fork for Packery.js
/*!
* angular-packery
* Forked from angular-masonry (Pascal Hartig, weluse GmbH, http://weluse.de/)
*/
(function () {
'use strict';
angular.module('wu.packery', []).controller('PackeryCtrl', [
'$scope',
'$element',
'$timeout',
@jrthib
jrthib / AnotherController.js
Created July 16, 2014 23:50
Factory using promises to start the socket.io authentication and session after logging into an Angular app.
(function() {
'use strict';
function AnotherController($scope, socket) {
// use the socket factory through your app, but you must use socket.then
// so that the actions occur once the socket is established
socket.then(function(socket) {
socket.emit('some_socket_event', {});
});