Skip to content

Instantly share code, notes, and snippets.

View dterracino's full-sized avatar
🐢
I may be slow to respond…

David Terracino dterracino

🐢
I may be slow to respond…
View GitHub Profile
@avianbc
avianbc / ExtensionMethods.cs
Created May 22, 2019 23:47
Enum friendly names via DisplayAttribute + DescriptionAttribute
public static class ExtensionMethods
{
/// <summary>
/// Returns friendly name for enum as long as enum is decorated with a Display or Description Attribute, otherwise returns Enum.ToString()
/// </summary>
/// <param name="value">Enum</param>
/// <returns>Friendly name via DescriptionAttribute</returns>
public static string ToFriendlyName(this Enum value)
{
Type type = value.GetType();
https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/hosts.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-simplified/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-adservers/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-coinminer/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-facebook/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-facebook/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/blocklist.kowabit.de/list.txt
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-ad/list.txt
@UweKeim
UweKeim / ColorConverting.cs
Last active October 9, 2024 14:25
HSL color, HSB color and RGB color types, as well as conversion methods between them in C# and .NET
namespace ZetaColorEditor.Colors;
using System;
using System.Drawing;
/// <summary>
/// Provides color conversion functionality.
/// </summary>
/// <remarks>
/// http://en.wikipedia.org/wiki/HSV_color_space
@mmurrell
mmurrell / example.cs
Last active June 8, 2019 03:29
Concurrency issues in Batch extension method.
public static class BatchLinq
{
public static IEnumerable<IEnumerable<T>> Batch<T>(this IEnumerable<T> source, int size)
{
if (size <= 0)
throw new ArgumentOutOfRangeException("size", "Must be greater than zero.");
using (IEnumerator<T> enumerator = source.GetEnumerator())
while (enumerator.MoveNext())
yield return TakeIEnumerator(enumerator, size);
@GMMan
GMMan / power_manage.md
Last active April 6, 2023 22:17
PlayStation Classic power management system, documented

PlayStation Classic power management system, documented

This document describes the power management system on the PlayStation Classic. It is mostly focused on the power_manage executable: the command line arguments, control files, and processes. It'll also touch upon the system service setup and startup script.

There are a few components to the power management system: the startup script, the power management service, thermal kernel modules, and supporting programs such as the USB reset script and thermal handling scripts. Let's start with

@BananaRama203
BananaRama203 / readme.md
Last active September 15, 2023 07:32
BleemSync Payload Design Document

BleemSync Logo

BleemSync Payload Design Document


This is a brief document to outline the initial design of the BleemSync payload for the purpose of giving devs an understanding of how BleemSync is deployed and outline any areas of the design which has room for improvement.

// Java code for thread creation by extending
// the Thread class
class MultithreadingDemo extends Thread
{
public void run()
{
try
{
// Displaying the thread that is running
System.out.println ("Thread " +
@colinbreame
colinbreame / DateRange.cs
Last active June 2, 2019 22:23 — forked from crmorgan/DateRange.cs
A c# class that represents a date range data structure.
using System;
using System.Collections;
using System.Collections.Generic;
namespace Utils
{
/// <summary>
/// Represents a range of dates.
/// </summary>
public struct DateRange : IEnumerable<DateTime>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "********************************";
char ssid[] = "********************************";
char pass[] = "********************************";
int n;
// ==UserScript==
// @name EmuParadise Download Workaround - 1.1.1
// @version 1.1.2
// @description Replaces the download button link with a working one
// @author Eptun
// @match https://www.emuparadise.me/*/*/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @grant none
// ==/UserScript==