Skip to content

Instantly share code, notes, and snippets.

@LordJZ
LordJZ / SpanSplitExtensions.cs
Created August 9, 2018 18:04
Split for Span
using System;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
public static class SpanSplitExtensions
{
public ref struct Enumerable1<T> where T : IEquatable<T>
{
public Enumerable1(ReadOnlySpan<T> span, T separator)
{
[MemoryDiagnoser]
public class BM
{
enum E
{
a,
b,
c
}
public class DdwrtParser
{
public JObject Read(ReadOnlySpan<char> str)
{
JObject result = new JObject();
while (str.Length > 0)
{
if (str[0] != '{')
throw new FormatException();
@LordJZ
LordJZ / ReadOnlyListProxy.cs
Created June 9, 2016 20:18
ReadOnlyListProxy
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Redacted
{
public static class ReadOnlyListProxy
@LordJZ
LordJZ / filters.txt
Created May 17, 2016 12:15
No-bullshit Habrahabr/Geektimes
! TM
tmfeed.ru##.menu.special
habrahabr.ru##.scroll_to_up
habrahabr.ru##.company_widgets
habrahabr.ru##.column-wrapper_bottom
habrahabr.ru##.popular_posts
habrahabr.ru##.similar-posts
habrahabr.ru##.bottom_buttons_panel
habrahabr.ru##.geektimes_posts
habrahabr.ru##.block_after_post
This file has been truncated, but you can view the full file.
Build started 01.10.2015 5:51:29.
Environment at start of build:
ALLUSERSPROFILE = C:\ProgramData
APPDATA = C:\Users\LordJZ\AppData\Roaming
CommonProgramFiles = C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
CommonProgramW6432 = C:\Program Files\Common Files
COMPUTERNAME = A554
ComSpec = C:\Windows\system32\cmd.exe
DevEnvDir = C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
@LordJZ
LordJZ / Windows 10.bat
Created August 24, 2015 17:37
Windows 10 tweaks
sc delete DiagTrack
sc delete dmwappushservice
sc config diagnosticshub.standardcollector.service start= disabled
sc config WMPNetworkSvc start= disabled
sc config AdobeARMservice start= disabled
schtasks /Change /DISABLE /TN "Adobe Acrobat Update Task"
@LordJZ
LordJZ / gist:8749c3798aad4e89e595
Last active August 29, 2015 14:27
Infinite Enumerable
class InfiniteEnumerable : IEnumerable<long>
{
public struct Enumerator : IEnumerator<long>
{
public void Dispose()
{
}
public bool MoveNext()
{
@LordJZ
LordJZ / AntiAFK.cs
Created May 20, 2015 09:06
Network-level World of Warcraft hacks from 2011
using System;
using System.IO;
using Kamilla.WorldOfWarcraft.Latest.Core;
using Kamilla.WorldOfWarcraft.Latest.OpcodeDatas;
using System.Threading;
namespace Kamilla.WorldOfWarcraft.Latest.Core.Hacks
{
[LoadPriority(LoadPriority.Medium)]
[ModuleReferences(typeof(Std))]
@LordJZ
LordJZ / vk-fixes.user.js
Last active August 25, 2017 11:31
VK patch reduces background VK messenger traffic 100 times
// ==UserScript==
// @name VK fixes
// @namespace vk-com
// @include https://vk.com/*
// @include http://vk.com/*
// @version 1
// @grant none
// ==/UserScript==
/* recommended filters in addition to EasyList