Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Geraghty thethomaseffect

View GitHub Profile
@thethomaseffect
thethomaseffect / XIVAnalysisOpenButton.user.js
Created Aug 26, 2019
Adds a button in the top right to open the currently open log in XIVAnalysis
View XIVAnalysisOpenButton.user.js
// ==UserScript==
// @name Open XIVAnalysis from FFLogs
// @namespace http://fflogs.com/
// @version 0.1
// @description Adds a button in the top right to open the currently open log in XIVAnalysis
// @author thethomaseffect#8330 Frank Reynolds (Phoenix)
// @match https://www.fflogs.com/reports/*
// @grant none
// ==/UserScript==
View keybase.md

Keybase proof

I hereby claim:

  • I am thethomaseffect on github.
  • I am thethomaseffect (https://keybase.io/thethomaseffect) on keybase.
  • I have a public key whose fingerprint is CD0B A480 AE01 6163 6044 0A80 AD95 3FCF 4876 6E39

To claim this, I am signing this object:

View TOMLoginRemover.js
/*
Paste into console to get rid of annoying facebook login prompt on TOM
news articles. If you make a userscript for this remember to wrap this
in a document.onReady block.
*/
document.getElementById("modal-fb_login").style.display = 'none';
@thethomaseffect
thethomaseffect / simple_tree.ts
Last active Jan 2, 2016
Simple tree implementation in TypeScript using only a single one-line function. It's obviously seriously basic and insert/delete operations would not be very efficient but then again your data is immutable so who needs to do that right? ;)
View simple_tree.ts
function N(...nodes:any[]) {
return nodes;
}
var tree =
N("root",
N("one", "one",
N("two", "two")),
N("one", "one",
N("two")));
View sample.go
package main
import "fmt"
type Person struct {
name string
}
func (p Person) GetName() string {
return p.name
@thethomaseffect
thethomaseffect / OOCSharp.cs
Created Oct 21, 2013
Simple OOP example in C#
View OOCSharp.cs
using System;
namespace OOCSharpExample
{
internal class OOCSharp
{
private static void Main(string[] args)
{
var person1 = new Person("Thomas", "Dublin", 23);
var person2 = new Person("John", "Sligo", 22);
@thethomaseffect
thethomaseffect / FunctionalCSharp.cs
Created Oct 21, 2013
Simple functional C# example
View FunctionalCSharp.cs
using System;
using Person = System.Tuple<string,string,int>;
namespace FunctionalCsharpExample
{
class FunctionalCSharp
{
static string CompareAge(Person a, Person b)
{
if (a.Item3 == b.Item3)
View csharp_in_powershell.ps1
$Source = @"
namespace CSharpPSTest
{
public static class PSTest
{
private static string _result = "Default Value";
public static string Get()
{
return "Get Success: " + _result;
}
@thethomaseffect
thethomaseffect / MaouConverter.py
Created May 6, 2013
A command-line converter from English to the language used by characters in the anime "Hataraku Maō-sama" in one line of code because I wanted to show off.
View MaouConverter.py
# MaouTranslator.py
print (str.lower(input("Enter English text to be translated: ")).translate(str.maketrans("abcdefghijklmnopqrstuvwxyz","azyxewvtisrlpnomqkjhugfdcb")))
View python_conversion.md

Python Number Conversion Chart

From To Expression