Skip to content

Instantly share code, notes, and snippets.

View itssimple's full-sized avatar

NoLifeKing itssimple

View GitHub Profile
@itssimple
itssimple / LessHacky.cs
Last active January 20, 2021 06:43
This is how you use Reflection to change TwitchLib-servers.
public class FDGTClient : WebSocketClient
{
public FDGTClient() :base()
{
var bindingFlags = BindingFlags.NonPublic | BindingFlags.Instance;
var urlField = base.GetType().BaseType.GetFields(bindingFlags).FirstOrDefault(f => f.Name.Contains("Url"));
urlField.SetValue(this, "wss://irc.fdgt.dev:443");
}
}
@itssimple
itssimple / main.js
Last active June 24, 2020 07:32
Overwolf Plugin, Disposable
let plugin = new OverwolfPlugin('OverwolfSamplePlugin', true);
plugin.initialize(status => {
if(!status) {
console.error('Could not load plugin');
return;
}
});
/* Do all the work that is needed by the plugin */
/**
* An enum that contains all games that support events through Overwolf
*/
const OverwolfGameWithEventSupport = {
APEX: 21566,
CSGO: 7764,
DOTA2: 7314,
DOTAUnderlords: 21586,
EscapeFromTarkov: 21634,
Fortnite: 21216,
@itssimple
itssimple / appveyor_build_dashboard.php
Created January 20, 2020 07:54
AppVeyor build dashboard (Requires that you log in to AppVeyor in the same browser to get the cookie for the websocket connection)
<?php
include_once 'curl_client.php';
$appVeyorDomain = getenv('APPVEYOR_DOMAIN');
$appVeyorToken = getenv('APPVEYOR_TOKEN');
$appVeyorClient = new cURLClient( "https://$appVeyorDomain", [
"Authorization: Bearer $appVeyorToken"
] );
#if DEBUG
public class String
{
// I think I might have ruined someones day now.
}
#endif
@itssimple
itssimple / DBScriptProvider.cs
Last active October 3, 2017 10:43
DbUp ScriptProvider
using DbUp.Engine;
using System;
using System.Collections.Generic;
using DbUp.Engine.Transactions;
using System.Reflection;
using System.Linq;
using System.ComponentModel;
namespace DevDBScriptRunner
{
@itssimple
itssimple / buildlog.txt
Created August 8, 2017 06:29
Build log when trying to build .NET Standard Lib with framework 4.6.2
1>------ Build started: Project: MN.L10n, Configuration: Release Any CPU ------
1>Build started 2017-08-08 08:26:54.
1>Building with tools version "15.0".
1>Project file contains ToolsVersion="". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="15.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424.
1>Target "EntityDeploy" skipped, due to false condition; ('@(EntityDeploy)' != '') was evaluated as ('' != '').
1>Target _CheckForUnsupportedTargetFramework:
1> Task "NETSdkError" skipped, due to false condition; ('$(_UnsupportedTargetFrameworkError)' == 'true') was evaluated as ('' == 'true').
1>Target CheckForImplicitPackageReferenceOverrides:
1> Using "CheckForImplicitPackageReferenceOverrides" task from assembly "E:\Program Files (x86)\Microsoft Visual Studio\2017