Skip to content

Instantly share code, notes, and snippets.

@fernferret
fernferret / keybase.md
Created March 31, 2020 19:09
keybase.md

Keybase proof

I hereby claim:

  • I am fernferret on github.
  • I am fernferret (https://keybase.io/fernferret) on keybase.
  • I have a public key ASBfwpOr3tScLbyNwI1EUgQKWpWVQy8dwP1Ka-FiwnRtOQo

To claim this, I am signing this object:

@fernferret
fernferret / SteamOpenID.java
Last active January 12, 2023 03:06
Steam OpenID Authentication in Java
package com.fernferret.steambot.web;
import org.openid4java.association.AssociationException;
import org.openid4java.consumer.ConsumerException;
import org.openid4java.consumer.ConsumerManager;
import org.openid4java.consumer.VerificationResult;
import org.openid4java.discovery.DiscoveryException;
import org.openid4java.discovery.DiscoveryInformation;
import org.openid4java.discovery.Identifier;
import org.openid4java.message.AuthRequest;
@fernferret
fernferret / upload_log.py
Last active December 14, 2015 08:59
Logfile uploader for logs.tf written in python! Because I'm too lazy to copy files over ssh and upload them...
#!/usr/bin/env python
'''
Log file uploader for http://logs.tf.
This should work with python 2.x (and probably 3.x)
Make sure you have the dependencies installed:
```
pip install requests argparse
```
@fernferret
fernferret / gist:3183094
Created July 26, 2012 16:33
How to read wiggle diffs
# Here's how to read a diff that
# wiggle puts in a file.
# wiggle - http://linux.die.net/man/1/wiggle
<<<<<<<
Here's what I found.
|||||||
Here's what the .rej file said I should find.
=======
Here's what the .rej file said should be here.
@fernferret
fernferret / branchfind.sh
Created July 25, 2012 19:25
Finds all Mercurial Branches that have Multiple Heads in a given repo.
#!/bin/bash
# This simple script will look at all named branches in a given repository
# and print out any branch that contains multiple open heads. This is useful
# to see if your repository is clean or if someone has pushed multiple
# anonymous branches.
foundone=""
# Retrieve the branch list. The format will contain other garbage, so only
@fernferret
fernferret / advertisements.txt
Created April 26, 2012 05:00
Read from a psudo json/yaml/python dictionary typed data structure via a python tokenizer
"Advertisements"
{
"1"
{
"type" "S"
"text" "Woo Stuff"
}
"2"
{
"type" "S"
@fernferret
fernferret / update.sh
Created December 10, 2011 17:55
Bukkit Updater Script
#!/bin/bash
ver="stable"
build="-1"
if [ -z $1 ] ; then
echo "Updating to latest STABLE build."
else
ver="dev"
echo "Updating to latest DEV build."
fi
@fernferret
fernferret / fixnbt.py
Created November 30, 2011 02:22
This file can fix (or break) Worlds that won't load in Minecraft
#!/usr/bin/python
"""A small nbt fixer for bukkit multiworld worlds.
A problem has been identified that when a world (that's not imported by the minecraft server) tries to be imported by bukkit, the server hangs.
The issue is that for some reason, having rain and thunder both set to 1 causes the hang. This utility will set these to default for you.
That's seriously all it does, and if you're on Windows you may prefer to use a GUI editor.
I was too lazy to install mono and NEINedit didn't save the files for me. So...
This class requires you have the NBT Python Library. To run it: