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
@dterracino
dterracino / gist:28ed76d28223d219b16941dec8bff04a
Created July 18, 2024 19:13
Top 1000 Most Used English Words - List 2
a
able
about
above
according
across
act
action
activity
actually
@dterracino
dterracino / gist:89b482e11b14bbbced119dcd407f286d
Created July 18, 2024 18:46
Top 1000 Most Used Words in English - List 1
a
ability
able
about
above
accept
according
account
across
act
@dterracino
dterracino / .gitignore
Created December 5, 2022 06:19 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
// ==UserScript==
// @name Steam Key Quick Activator
// @namespace http://pedrofracassi.me/
// @version 1.2
// @description Activates Steam Keys Quickly!
// @author Pedro Fracassi (http://pedrofracassi.me)
// @match https://store.steampowered.com/account/registerkey?key=*
// @grant none
// @run-at document-end
// ==/UserScript==
@dterracino
dterracino / MOREtrackers.user.js
Created October 13, 2022 19:23 — forked from metinsanli/MOREtrackers.user.js
Adds more trackers for torrent magnet link.
// ==UserScript==
// @name MOREtrackers
// @description:tr Torrent magnet bağlantısına fazladan izleyici ekler.
// @description:az Torrent maqnit bağlantılarına daha çox izləyici əlavə edir.
// @description:en Adds more trackers to torrent magnet links.
// @description:de Fügt mehr Tracker zu Torrent-Magnet-Links hinzu.
// @description:fr Ajoute plus de trackers aux liens magnétiques torrent.
// @description:es Agrega más rastreadores a los enlaces magnéticos de torrent.
// @description:ru Добавляет больше трекеров к магнитным торрент-ссылкам.
// @version 0.5
@dterracino
dterracino / Google Translate - 2022.user.js
Created October 13, 2022 19:19
This script displays a menu option in your userscript manager to translate the current page using Google Translate
// ==UserScript==
// @name Google Translate - 2022
// @namespace https://greasyfork.org/users/906463-coffeegrind123
// @homepageURL https://gist.github.com/coffeegrind123/8ca2c7e700aca3341c71da8d612f6130
// @supportURL https://greasyfork.org/scripts/443947-google-translate-2022
// @include https://*/*
// @include http://*/*
// @exclude http*://*.google.*/*
// @grant GM_registerMenuCommand
// @noframes
public class AsyncLazyPipeline<TSource>
{
private Func<Task<TSource>> Expression { get; }
public AsyncLazyPipeline(Func<Task<TSource>> expression)
{
Expression = expression;
}
public Task<TSource> Flatten() => Expression();
public static partial class LinqExtensions
{
public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> ma, Func<A, Maybe<B>> f, Func<A, B, C> select) => ma.Bind(a => f(a).Map(b => select(a, b)));
}
@dterracino
dterracino / CSharpErrorCodes.cs
Created July 6, 2021 01:49 — forked from thomaslevesque/CSharpErrorCodes.cs
Generate "warnings as errors" ruleset from error code definitions in Roslyn source code
void Main()
{
string errorCodesFileUrl = "https://raw.githubusercontent.com/dotnet/roslyn/master/src/Compilers/CSharp/Portable/Errors/ErrorCode.cs";
string errorCodesFileContent = new WebClient().DownloadString(errorCodesFileUrl);
var syntaxTree = CSharpSyntaxTree.ParseText(errorCodesFileContent);
var root = syntaxTree.GetRoot();
var enumDeclaration =
root.DescendantNodes()
.OfType<EnumDeclarationSyntax>()
.First(e => e.Identifier.ValueText == "ErrorCode");
@dterracino
dterracino / CSharpRecipe.cs
Created June 28, 2021 02:41 — forked from jacobslusser/CSharpRecipe.cs
ScintillaNET C# Automatic Syntax Highlighting
// For an explanation of this code visit:
// https://github.com/jacobslusser/ScintillaNET/wiki/Automatic-Syntax-Highlighting
// Configuring the default style with properties
// we have common to every lexer style saves time.
scintilla.StyleResetDefault();
scintilla.Styles[Style.Default].Font = "Consolas";
scintilla.Styles[Style.Default].Size = 10;
scintilla.StyleClearAll();