Skip to content

Instantly share code, notes, and snippets.

View ajhodges's full-sized avatar
🤔

Adam Hodges ajhodges

🤔
View GitHub Profile
@ajhodges
ajhodges / pickem-dnd.user.js
Last active August 23, 2019 19:15
Userscript for adding drag n' drop to Yahoo Pick'em
// ==UserScript==
// @name Yahoo Pick'em Drag n' Drop
// @namespace http://tampermonkey.net/
// @version 0.1
// @description No more awful confidence points UI!
// @author ajhodges
// @match https://football.fantasysports.yahoo.com/*
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@ajhodges
ajhodges / eth-vpc.json
Created May 25, 2018 14:05
Prerequisites for AWS Blockchain for Ethereum
{
"Description": "Template used to create the base network infrastructure for the Ethereum nodes",
"Outputs": {
"ALBSecurityGroup": {
"Description": "Security group for ETH ALB",
"Export": {
"Name": {
"Fn::Sub": "${AWS::StackName}-AlbSecurityGroup"
}
},
<?php
if(isset($_GET["blah"])){
//check if correct
if($taxonguess == "taxon"){
$correct = true;
} else {
$correct = false;
}
}
@ajhodges
ajhodges / gist:9940869
Created April 2, 2014 19:04
Receive delimited protobuf message in Java
private byte readByte() {
ByteBuffer byteBuffer = ByteBuffer.allocate(1);
timeout.start("Timed out during protocol buffers message parsing");
try {
int bytesRead = 0;
while(bytesRead==0)
bytesRead+=client.read(byteBuffer);
} catch (IOException e) {
//if (running) testMenu.createErrorDialog("Error", "Error parsing protobuf message", null);
return 0;