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
def calculate_font_size(width, height, words) | |
font_size = 0 | |
while true do | |
return font_size if !will_text_fit(width, height, words, font_size + 1) | |
font_size += 1 | |
end | |
end | |
def will_text_fit(width, height, words, font_size) | |
rows = 1 |
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
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
cinstm fiddler4 | |
cinst git.install | |
cinstm console-devel | |
cinstm poshgit | |
cinstm dotpeek |
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
class MemBroker : IDisposable | |
{ | |
private readonly Subject<object> s = new Subject<object>(); | |
public IDisposable Register<T>(Action<T> handler) | |
{ | |
return s.Subscribe(o => | |
{ | |
if (o is T) handler((T)o); | |
}); |
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
Disable-UAC | |
#--- Configuring Windows properties --- | |
#--- Windows Features --- | |
# Show hidden files, Show protected OS files, Show file extensions | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFullPathInTitleBar -EnableShowFileExtensions | |
#--- File Explorer Settings --- | |
# will expand explorer to the actual folder you're in |
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
using System.Diagnostics; | |
const bool async = true; | |
const bool sync = true; | |
int concurrency = 0, total = 0, dequeued = 0; | |
var s = Stopwatch.StartNew(); | |
var cts = new CancellationTokenSource(); | |
cts.CancelAfter(TimeSpan.FromSeconds(30)); |