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
function pollUrl(url, renderer) { | |
return function(render){ | |
if(render == undefined) { render = renderer; } | |
$.getJSON(url, function(data){ | |
render(data); | |
}).always(function(){ | |
setTimeout(pollUrl(url, render), 5000); | |
}); | |
}; |
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 PriorityCollection | |
{ | |
private readonly BlockingCollection<Item> low = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Item> middle = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Item> high = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Guid> main = new BlockingCollection<Guid>(); | |
private readonly BlockingCollection<Item>[] queue; | |
private readonly Dictionary<Priority, BlockingCollection<Item>> priorityMap = new Dictionary<Priority, BlockingCollection<Item>>(); | |
public List<Priority> TestList { get; private 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
""" Author contact: sepero 111 @ gmail . com """ | |
from django import http | |
from django.utils.http import urlquote | |
from django.core import urlresolvers | |
class RemoveSlashMiddleware(object): | |
""" | |
This middleware works like django's built in APPEND_SLASH, but in reverse. Eg |
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
@echo off | |
SET st2Path=C:\software\SublimeText\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f |