This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('saidpApp') | |
.directive('rollOnLoad', function(){ | |
return { | |
restrict: 'A', | |
link: function(scope,element){ | |
element.addClass('preroll'); | |
setTimeout(function() { | |
requestAnimationFrame(function() { | |
element.removeClass('preroll'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.level1>.x-panel-bwrap>.x-panel-tbar, .level2>.x-panel-bwrap>.x-panel-tbar, .level3>.x-panel-bwrap>.x-panel-tbar').click(function(){ | |
parent = this.parentNode; | |
body = $(parent).children('.x-panel-body'); | |
xpanel = $(body).children('.x-panel'); | |
// I always specifically open and close because I've seen some issues with toggleClass. - CM | |
if($(this).hasClass('open')) { | |
$(this).removeClass('open'); | |
$(xpanel).removeClass('open'); | |
} else { | |
$(this).addClass('open'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var network = getNetworkSystem(); | |
var io = initWebsockets(); | |
var waitForNodes = function(reject) { | |
return network.onNodeIdentification() | |
.then(function(nodeId) { | |
io.emit('node found', nodeId); | |
}, reject) | |
.then(waitForNodes.bind(this, reject)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
EventEmitter = require('event').EventEmitter, | |
httpProxy = require('http-proxy'); | |
var proxyAgent = new http.Agent({ maxSockets: 3 }); | |
proxyAgent.createConnection = function(options) { | |
var clientSocket = registry.getSocket(options.servername); | |
if(!clientSocket) { | |
// Set clientSocket to a future Socket here somehow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('saidpApp') | |
.directive('ngDebounce', function ($timeout) { | |
return { | |
restrict: 'A', | |
require: '?ngModel', | |
priority: 99, | |
link: function (scope, elm, attr, ngModel) { | |
if (!ngModel || attr.type === 'radio' || attr.type === 'checkbox') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getRecentEpisodes() | |
{ | |
$podcastid = Input::get('podcast_id'); | |
$podcast = Podcast::find($podcastid); | |
// If we don't have any epsisodes, we need to import them for the feed | |
$this->episodesController->importEpisodes($podcast); | |
// Now let's collect our episodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Episode | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { get; set; } | |
[Indexed] | |
public int SubscriptionId { get; set; } | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public string Content { get; set; } | |
public string Guid { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subscription sub = new Subscription | |
{ | |
Title = "Accidental Tech Podcast", | |
Description = "Nerd stuff" | |
}; | |
var result = await App.db.InsertAsync(sub); | |
Debug.WriteLine("{0} : {1} {2}", sub.Id, sub.Title, sub.Description); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('sawebApp') | |
.directive('pdkFilesSelected', function($parse) { | |
return { | |
restrict: 'A', | |
link: function(scope, elm, attrs) { | |
var onSelected = $parse(attrs.pdkFilesSelected); | |
elm.on('change', function() { | |
scope.$apply(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<log4net> | |
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender"> | |
<immediateFlush value="true" /> | |
<file value="pdk.log"/> | |
<appendToFile value="true" /> | |
<maximumFileSize value="100KB" /> | |
<maxSizeRollBackups value="1" /> | |
<layout type="log4net.Layout.PatternLayout"> | |
<conversionPattern value="%date{yyyy-MM-dd hh:mm:ss} %level %thread %logger - %message%newline" /> |