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
// Run this in LINQPad, and add a reference to my https://github.com/ShomreiTorah/Libraries/tree/master/ShomreiTorah.Common | |
const string domain = "<TODO: insert domain here>"; | |
static readonly Regex parseId = new Regex(@"action=edit_addresses&id=(\d+)"); | |
static readonly Regex findSccsrf = new Regex(@"<input type=""hidden"" name=""sccsrf"" value=""(\w+)""/>"); | |
bool dryRun = false; | |
async Task Main() { | |
var cookies = new CookieContainer(); |
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
copy(await (async () => { | |
var lastId = localStorage.SLaks___lastExportedId || /* Paste the last ID from the spreadsheet here: */ ""; | |
function takeWhile(cb) { | |
let found = false; | |
return x => { | |
if (found) return false; | |
if (cb(x)) return true; | |
found = true; | |
return true; | |
} |
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
// First, load jQuery: | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
//////////////////////////////////////////////////////////////////////////// | |
// Remove all disliked songs: | |
for (const el of $('ytmusic-responsive-list-item-renderer:has([like-status="DISLIKE"])').get()) { | |
el.dispatchEvent(new MouseEvent('contextmenu')); |
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
Error Evaluation of method System.Collections.Immutable.ImmutableHashSetDebuggerProxy`1[Microsoft.VisualStudio.Composition.RuntimeComposition+RuntimePart].get_Contents() requires use of the static field System.Collections.Immutable.AllocFreeConcurrentStack`1[System.Collections.Immutable.SecurePooledObject`1[System.Collections.Generic.Stack`1[System.Collections.Immutable.RefAsValueType`1[System.Collections.Immutable.SortedInt32KeyNode`1[System.Collections.Immutable.ImmutableHashSet`1+HashBucket[Microsoft.VisualStudio.Composition.RuntimeComposition+RuntimePart]]]]]].stack, which is not available in this context. |
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
System.ArgumentException: The string is empty. | |
Parameter name: prefix | |
> Microsoft.Internal.VisualStudio.Shell.Validate.IsNotEmpty(string s, string paramName) Unknown | |
Microsoft.VisualStudio.Services.Settings.DiskStringStorage.NamesStartingWithInternal(string prefix) Unknown | |
Microsoft.VisualStudio.Services.Settings.DiskStringStorage.LogExceptions<T>(string name, System.Func<string, T> func, Microsoft.VisualStudio.Settings.Telemetry.SettingScenario scenario, Microsoft.VisualStudio.Settings.Telemetry.SettingAction action, T defaultValue) Unknown | |
Microsoft.VisualStudio.Services.Settings.DiskStringStorage.NamesStartingWith(string prefix) Unknown | |
Microsoft.VisualStudio.Services.Settings.DelegatingStringStorage.NamesStartingWith.AnonymousMethod__1(Microsoft.VisualStudio.Settings.IStringStorage v) Unknown | |
System.Linq.Enumerable.<SelectManyIterator>d__8<TSource, TResult>.MoveNext() Unknown |
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
static void Main() { | |
var fibonacci = from fib in YCombinate<ulong, ulong>.Definition | |
select n => n < 2 ? 1 : fib(n - 1) + fib(n - 2); | |
Console.WriteLine(fibonacci(5)); | |
} | |
delegate TDelegate Recursive<TDelegate>(TDelegate r); | |
static class YCombinate<TArg, TReturn> { | |
public static class Definition { | |
public static Func<TArg, TReturn> Select(Recursive<Func<TArg, TReturn>> definition) { |
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
MoveNext: True | |
MoveNext: False | |
MoveNext: True | |
MoveNext: False |
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
Microsoft.CodeAnalysis.Editor.CSharp.EventHookup.IHACK_EventHookupDismissalOnBufferChangePreventerService Microsoft.CodeAnalysis.CSharp.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.ISignatureHelpProvider Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.IQuickInfoProvider Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.IHighlighter Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.ICommandHandler Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.IBraceMatcher Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.ITextBufferAssociatedViewService Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.ITodoListProvider Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.IPreviewFactoryService Microsoft.CodeAnalysis.EditorFeatures | |
Microsoft.CodeAnalysis.Editor.Implementation.Outlining.OutliningTaggerProvider Microsoft.CodeAnalysis.EditorFeatures |
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; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using Sigil.NonGeneric; | |
namespace VSThemeBrowser.VisualStudio { | |
static class ReflectionUtils { | |
static readonly AssemblyBuilder assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("RoslynETAHost"), AssemblyBuilderAccess.Run); | |
static readonly ModuleBuilder module = assembly.DefineDynamicModule(assembly.GetName().Name); |
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
InvalidOperationException, no message, apparently because m_value.CastToReferenceValue() returned null. | |
> Microsoft.VisualStudio.VIL.Host.dll!Microsoft.VisualStudio.VIL.DebuggerHost.MemoryManager2.VirtualAddress2.WriteReference(Ilrun.Slot value) Unknown | |
Microsoft.VisualStudio.VIL.Host.dll!Microsoft.VisualStudio.VIL.VisualStudioHost.InspectionFrame.SetVariableValue(Microsoft.VisualStudio.VIL.DebuggerHost.CorValue lVal, Ilrun.Slot rVal) Unknown | |
Microsoft.VisualStudio.VIL.Host.dll!Microsoft.VisualStudio.VIL.VisualStudioHost.InspectionFrame.SaveModifiedVariables() Unknown | |
Microsoft.VisualStudio.VIL.Host.dll!Microsoft.VisualStudio.VIL.VisualStudioHost.Interpreter.InterpretInspectionQuery(Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext inspectionContext, Microsoft.VisualStudio.Debugger.CallStack.DkmStackWalkFrame frame, Microsoft.VisualStudio.Debugger.Metadata.Assembly queryAssembly, string expression, string queryClassName, string queryMethodName, Microsoft.VisualStudio.VIL.VisualStudioHost. |
NewerOlder