Skip to content

Instantly share code, notes, and snippets.

View DanBradbury's full-sized avatar

Dan Bradbury DanBradbury

View GitHub Profile
@DanBradbury
DanBradbury / gist:7605383
Created November 22, 2013 19:23
command test
package com.achimala.leaguelib.tests;
import java.util.concurrent.locks.ReentrantLock;
import com.achimala.leaguelib.connection.LeagueAccount;
import com.achimala.leaguelib.connection.LeagueConnection;
import com.achimala.leaguelib.connection.LeagueServer;
import com.achimala.leaguelib.errors.*;
import com.achimala.leaguelib.models.*;
import com.achimala.util.Callback;
@DanBradbury
DanBradbury / gist:7669319
Created November 27, 2013 01:34
Items Items Items
[ Abyssal Scepter, 3001 ],[ Aegis of the Legion, 3105 ],[ Amplifying Tome, 1052 ],[ Ancient Coin, 3301 ],[ Archangel's Staff, 3003 ],[ Archangel's Staff (Crystal Scar), 3007 ],[ Athene's Unholy Grail, 3174 ],[ Atma's Impaler, 3005 ],[ Augment: Death, 3198 ],[ Augment: Gravity, 3197 ],[ Augment: Power, 3196 ],[ Avarice Blade, 3093 ],[ B. F. Sword, 1038 ],[ Banner of Command, 3060 ],[ Banshee's Veil, 3102 ],[ Berserker's Greaves, 3006 ],[ Bilgewater Cutlass, 3144 ],[ Blackfire Torch, 3188 ],[ Blade of the Ruined King, 3153 ],[ Blasting Wand, 1026 ],[ Bonetooth Necklace, 3166 ],[ Bonetooth Necklace, 3167 ],[ Bonetooth Necklace, 3168 ],[ Bonetooth Necklace, 3169 ],[ Bonetooth Necklace, 3171 ],[ Boots of Mobility, 3117 ],[ Boots of Speed, 1001 ],[ Boots of Swiftness, 3009 ],[ Brawler's Gloves, 1051 ],[ Catalyst the Protector, 3010 ],[ Chain Vest, 1031 ],[ Chalice of Harmony, 3028 ],[ Cloak of Agility, 1018 ],[ Cloth Armor, 1029 ],[ Crystalline Flask, 2041 ],[ Dagger, 1042 ],[ Deathfire Grasp, 3128 ],[ Doran's Blad
@DanBradbury
DanBradbury / gist:7796795
Created December 4, 2013 22:30
java run
dan@Nikki:~/apps/gamelog/current/leaguelib/src$ java -verbose com/achimala/leaguelib/tests/MainTest d
[Opened /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.String from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.reflect.Type from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /usr/java/jdk1.7.0_45/jre/lib/rt.jar]
@DanBradbury
DanBradbury / gist:8290977
Created January 6, 2014 22:28
OnlyOneSpec

RELEASE TARGET

  • iOS = Android > PC > Unix

DESIGN PATTERN

  • Level based gameplay. Think old school mario, super meatboy, etc

iOS VIEW PORT

Twisted Treeline Cheatsheet

General Knowledge: Good things to know around the map

Early game

  • Alters unlock at 3 minutes
  • Solo lanes has 3 waves come before 3 minutes. Level 3 is obtainable but you must push
  • Jungle can clear 1 round of camps and repeat wolves for before 3 minutes (tested with Riven)
  • Quick Jungle clear with counter jungle @ 2:38 with level 3. With Udyr I could get 3 and be in their bush by altar by 2:50 (nuts)
@DanBradbury
DanBradbury / gist:8852791
Last active August 29, 2015 13:56
Rails 2 Asset issue

When assets are being served (all properly) we get /javascripts/effects.js?83bb2c8dc7fb2ebd34943d7e86f73878df78abdd


However when we get a bad load (with the two files not including their extension) the same file is returned as follows /javascripts/effects.js?eb1dd1c52ca577a5ade625f0560dcad09939207f

Obviously there are two different fingerprints being added to the end of the same file.

The issue with the missing files came up because of extensions not being added to the file

<%= stylesheet_link_tag jquery-1.8.88.custom %>
@DanBradbury
DanBradbury / gist:9074075
Created February 18, 2014 16:16
Before and after

@DanBradbury Saw your note in HipChat about the confusing update_associations method. You are totally right that thing is poorly commented and confusing. I don't blame you for throwing up your hands. I myself was confused at the the code when I looked at it the other day (it was written quite a while ago and I'll take the blame for that). What I can tell you is that it was written for a particular purpose to allow people from other contexts to modify their associations to an object (like assigning a corporate message to their own local item) in a way that would preserve the associations made by someone at at a sibling level entity that they cannot see. As such, the above being said it may not be as necessary to use that method when updating associations via the API since we likely will never have to deal with that complicated context issue that we need to in the UI.

All that being said, something has gotten lost in the the functionality in how the update action has been handled (where it no longer calls the

@DanBradbury
DanBradbury / gist:10208060
Last active August 29, 2015 13:58
Scraping Google Images

Cause we swag like that

page = agent.get('http://images.google.com/images?q=puppy')

Then find the appropriate url link that is oversized (hmm)

/url?q=http://www.123callingalldogs.com/FAQ&sa=U&ei=FIREU9LuHaaW2QWLyoD4BA&ved=0CDAQ9QEwAQ&usg=AFQjCNGa0jrNnHSiJ3QywWF1aQaDXbXmiA

The image we want is http://www.123callingalldogs.com/savedimages/macexplorer_com-puppy-dog-26.jpg so we are still pretty far off.

We should be tracking and measuring the use of each feature. Since the configuration is derived from the application we should be able to achieve this from admin statistics:
##### Page Use:
- Most visited pages
- Most edited pages
- Most performed actions w/in edit pages
- Number of unique visitors to those pages
##### Feature Use
- Basic Product functionality used most often
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"
" " let Vundle manage Vundle, required
Plugin 'gmarik/vundle'