Skip to content

Instantly share code, notes, and snippets.

@Rast1234
Rast1234 / remember_me.reg
Created June 5, 2022 01:43
Remember me command line args + TexMod + Windows debugger
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\RememberMe_stage1.exe]
"Debugger"="\"C:\\Program Files (x86)\\Steam\\steamapps\\common\\Remember Me\\Binaries\\Win32\\RememberMe_stage2.exe\" -ReadPoolSizeFromIni -DisableTexturePool -USEALLAVAILABLECORES"
@Rast1234
Rast1234 / ExampleEngine.ini
Created June 5, 2022 00:25
RememberMe tweaked config. File location: Documents\My Games\UnrealEngine3\RememberMeGame\Config
[URL]
Protocol=unreal
Name=Player
Map=Adrift.umap
LocalMap=Adrift.umap
LocalOptions=
TransitionMap=Adrift.umap
MapExt=umap
EXEName=RememberMe.exe
DebugEXEName=DEBUG-RememberMe.exe
@Rast1234
Rast1234 / Throttler.cs
Last active January 6, 2019 23:06
async parallel downloading
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace VOffline.Services
{
public class Throttler
{
public async Task<IReadOnlyList<T>> ProcessWithThrottling<T>(Task<T>[] tasks, int limit, CancellationToken token)
@Rast1234
Rast1234 / CancellableConstraint.cs
Last active January 6, 2019 19:08
vkApi tweaks: User-Agent, custom rate limit, CancellationToken
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using VkNet.Abstractions.Core;
using VkNet.Utils;
namespace VOffline.Services.Vk
{
public class CancellableConstraint : IAwaitableConstraint
@Rast1234
Rast1234 / defender-kb915597-fix.cmd
Created November 18, 2018 13:38
clean win7 on old laptops
"%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe" -removedefinitions -all
waitfor /T 5 pause 2>nul
"%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe" -SignatureUpdate
@Rast1234
Rast1234 / PersistentOrganizationServiceProxy.cs
Last active October 10, 2018 17:42
IOrganizationService with ADFS IFD authentication and SecurityToken self-renewal
using System;
using log4net;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
/// <summary>
/// Only works if ClientCredentials are set (see base.AuthenticateCore)
/// </summary>
public class PersistentOrganizationServiceProxy : OrganizationServiceProxy
{
@Rast1234
Rast1234 / errors.md
Last active February 19, 2018 09:02
errors.md

при выполнении db upgrade оно ругнулось:

/usr/lib/python3.6/site-packages/cerberus/validator.py:1338: UserWarning: No validation schema is defined for the arguments of rule 'url'
"'%s'" % method_name.split('_', 2)[-1])
/usr/lib/python3.6/site-packages/cerberus/validator.py:1338: UserWarning: No validation schema is defined for the arguments of rule 'istime'
"'%s'" % method_name.split('_', 2)[-1])

при запуске приложений также есть такие вот ошибки

@Rast1234
Rast1234 / virgil_coin_miner_assistant.py
Last active November 8, 2017 11:39
Quickly hacked bot for virgil coin miner game
from pprint import pprint
import time
import requests
"""
assists in buying most optimal gears to increase mining speed
"""
class Miner:
@Rast1234
Rast1234 / no_more_stories.js
Last active March 11, 2020 10:20
Removes VK stories from all friends
@Rast1234
Rast1234 / CallbackToAsync
Created July 31, 2014 16:00
Mix callbacks and async
//For example, given the following method:
public void GetStringFromUrl(string url, Action<string> onCompleted);
//The only way I know of to wrap this into a method returning a task is:
public Task<string> GetStringFromUrl(string url)
{
var t = new TaskCompletionSource<string>();