This file contains hidden or 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
| static void Main() | |
| { | |
| var builder = new ContainerBuilder(); | |
| builder.RegisterType<SomeDependency>().SingleInstance(); | |
| builder.RegisterTypeWithCaching<MyApplicationService>().SingleInstance(); | |
| var container = builder.Build(); | |
| var proxy = container.Resolve<MyApplicationService>(); | |
| TestCase1(proxy); |
This file contains hidden or 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
| private IEnumerable<Type> GetClosestInterfaces(Type type) | |
| { | |
| IEnumerable<Type> interfaces = type.GetInterfaces(); | |
| var parents = interfaces.Except( | |
| interfaces.SelectMany(x => x.GetInterfaces()).Intersect(interfaces)); | |
| return parents; | |
| } |
This file contains hidden or 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 active = false; | |
| function changeRefer(details) { | |
| if (!active) return; | |
| for (var i = 0; i < details.requestHeaders.length; ++i) { | |
| if (details.requestHeaders[i].name === 'Referer') { | |
| details.requestHeaders[i].value = 'http://www.google.com/'; | |
| break; | |
| } |
This file contains hidden or 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
| void Main() | |
| { | |
| var server = "imap.gmail.com"; | |
| var login = "**********"; | |
| var password = "**********"; | |
| var attachmentsPath = @"C:\test"; | |
| var inboxFolderName = "INBOX"; | |
| var processedFolderName = "PROCESSED"; | |
This file contains hidden or 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
| { | |
| init: function(elevators, floors) { | |
| var midPoint = Math.floor(floors.length / 2); | |
| var rotator = 0; | |
| _.each(floors, function(floor) { | |
| floor.on("up_button_pressed", function() { | |
| var destination = floor.floorNum(); | |
| goToFloor(pickElevator(destination), destination, "press up"); | |
| }); |
This file contains hidden or 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 sell = function() { | |
| window.sellInts = window.sellInts || []; | |
| var sellInt = setInterval(function() { | |
| if(parseInt($('#make_amt').text()) > 0) { | |
| try { | |
| $('#sell_btn').click() | |
| } catch(e) { } | |
| } | |
| else { |
This file contains hidden or 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
| javascript:(function(){$('body').append('<script type="text/javascript" src="https://raw.github.com/lakario/utils/master/bb-pr-pager.js"></script>')})(); |
This file contains hidden or 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 addPager = function() { | |
| $('#custpager').remove(); | |
| $('body').append('<div id="custpager" style="color:#000;background:#ccc;border:1px solid black;padding:10px;position:fixed;top:10px;right:10px;opacity:.75;"> \ | |
| <p>Starting at \ | |
| <select name="startIndex" id="custpager-start"></select>, \ | |
| show at most \ | |
| <select name="startIndex" id="custpager-count"> \ | |
| <option>(default)</option> \ | |
| <option>5</option> \ |
This file contains hidden or 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
| int GetDistance(string val) { | |
| int max = -1; | |
| for(var i = 0; i <= val.Length / 2; i++) { | |
| for(var y = val.Length - 1; y > 0; y--) { | |
| var dist = (y - i) - 1; | |
| if(val[i] == val[y] && dist > max) { | |
| max = dist; | |
| break; | |
| } | |
| } |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Override Plug.dj chat | |
| // @version 0.1 | |
| // @description Bypasses chat send filtering. | |
| // @match *plug.dj/*/* | |
| // @copyright 2012+, You | |
| // ==/UserScript== | |
| var unsafeWindow = window; | |
| var fireLazers = function() { |
NewerOlder