Skip to content

Instantly share code, notes, and snippets.

View lolp1's full-sized avatar
💭
Practice... can make perfect, if done right 👍

Jacob Kemple lolp1

💭
Practice... can make perfect, if done right 👍
  • Stylesoft
  • Salt lake city, Utah
View GitHub Profile
@lolp1
lolp1 / ExampleLogElements.cs
Last active February 14, 2016 05:49
Log improvements.
.
public static void Main()
{
Logs = new LogManager();
Logs.Add(new LogElement("Program"));
bool shouldLog = Randomizer.GenerateNumber(5, 10) >= 7;
var logEntry = new LogEntry(LogLevel.Warning, "Argument format string");
ILogElement element = Logs["Sender"];
@lolp1
lolp1 / ConsoleForm.cs
Last active July 19, 2018 18:48
Debug helpers
public class FormConsole : IDisposable
{
private readonly Form _form;
public FormConsole()
{
_form = new Form();
var textBox = new RichTextBox {Name = "DebugFormTextBox"};
_form.Controls.Add(textBox);
public static class DictionaryExtensions
{
public static void AddItem<T>(this Dictionary<string, object> dictionary, string key, T value)
{
if (!dictionary.ContainsKey(key))
{
dictionary[key] = value;
return;
}
@lolp1
lolp1 / ActionExtensions.cs
Last active June 23, 2016 03:15
Misc. Extensions for C#
using System;
using System.Threading.Tasks;
namespace Stylesoft.Common.Extensions
{
public static class ActionExtensions
{
public static async void ExecuteDelayed(this Action action, TimeSpan span)
{
await Task.Delay(span);
@lolp1
lolp1 / Memory.cs
Created July 21, 2016 19:32
Memory example
public static class Memory
{
private static IProcess _process;
public static IMemory Instance { get; private set; }
public static IProcess Process
{
get { return _process; }
private set
@lolp1
lolp1 / Program.cs
Created December 7, 2016 02:55
Simple logger example
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Linq;
namespace Logs
{
class Program
{
static void Main()
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Process.NET.Marshaling
@lolp1
lolp1 / WindowEnumerationExamples.cs
Created November 8, 2017 02:37
Example of extracting info from windows on the desktop.
/* -------------------------------------
* Produces the output (partial) below
* Title: .NET-BroadcastEventWindow.4.0.0.0.3719ec0.0 Visible: False Thread: 8632 pid: 6148
* Title: Microsoft Edge Visible: True Thread: 9172 pid: 8608
* ....
*/ -------------------------------------
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@lolp1
lolp1 / outut.txt
Last active December 23, 2017 07:50
debug logs
[Debug] -> STAGE ONE STARTING
[Debug]Loader.exe] -> AntiDebugTrap traps #1 and #2 enabled and set on a timer, first elapsed event passed.
[Debug]Loader.exe] -> Wow-64.exe was open. Killing the process and reloading it in its suspended state.
[Debug]Loader.exe] -> Preparing the download of loader.dll using a newly generated name for the file obtained using a simple AES tool.
[Debug]Loader.exe] -> Downloading the new loader.dll URL obtained by extracting info from a meta-data file restricted from non-local server assets. completed, meta-data stored in memory for later use.
[Debug]Loader.exe] -> Download of randomized named loader.dll completed, using the existing meta-data stored in memory to grab its URL it was downloaded from. Loader.dll loaded into process.
[Debug] -> STAGE ONE COMPLETE, STAGE TWO STARTING
[Debug]Loader.dll] -> AntiDebugTrap traps #1 and #2 and their timer disabled, methods #3 and #4 are set on a timer, first elapsed event passed.
[Debug]Loader.dll] -> WowNet.Domain.dll checking users cre
[8:19 PM] Rembrandt: @brb banning xeno again serious question about the direction of UC. I'm looking at the recent staff additions, and while I have nothing against any of them personally, I'm wondering if they are being acquired for more of a janitorial job than a moderatorship. I've looked at some (not all) of the latest adds and they don't seem to have the same quality as the mods of the past. I'm speaking about technical ability and maturity. I could be completely off the ball here, and I hope you disagree and see things differently (and I hope others do too and not in this negative light). But this is just my view. Wondering what your thoughts are.(edited)
[8:20 PM] uhh1ind: despacito
[8:20 PM] brb banning xeno again: because realistically, moderating isn't all about your technical prowess
[8:21 PM] brb banning xeno again: I mean, its fantastic if we get someone interested in a moderator position and also knows a lot about a heap of different stuff, but that's the same in the professional careers