Skip to content

Instantly share code, notes, and snippets.

View DanBradbury's full-sized avatar
:shipit:
Doing the work

Dan Bradbury DanBradbury

:shipit:
Doing the work
View GitHub Profile

CURRENT_COLOR = c_red;

COLORS[0] = c_aqua;
COLORS[1] = c_fuchsia;
COLORS[2] = c_red;
COLORS[3] = c_lime;

RATIO = 1;
@DanBradbury
DanBradbury / EP1 Notes
Created July 20, 2014 20:01
Notes EP1
![](http://i.imgur.com/zhS4Oah.png)
```
CURRENT_COLOR = c_red;
COLORS[0] = c_aqua;
COLORS[1] = c_fuchsia;
COLORS[2] = c_red;
COLORS[3] = c_lime;
RATIO = 1;
@DanBradbury
DanBradbury / gist:07bafe26a5cdfdc24c60
Last active August 29, 2015 14:04
Ep1: Hello GameMaker

What would a first episode be if not Hello World? In this episode we are going to create a simple Hello World application using GML only. For anybody who has used GML before this is going to be eyerollingling obvious but for those Drag & Drop developers this is for you.

So let's get started and create a new project helloWorld and create a new object.

obj_hello -

draw_set_color(c_red);
draw_text(x,y,"Hello World");

#Making Keyboard Tool Example Source

When all is done we will be making a small keyboard application that will listen to IO even when the screen is out of focus. To do this we will utilize the keyboard_check_direct method that GM provides and use the built in Windows Virtual Key Codes. I heard somewhere that use of these keycodes is not recommended but I think we use whatever we can to accomplish the task at hand.

##Where to get started Create a new project and and let's create a rough skeleton of what this thing might look like.

  1. Create an obect keyboardHUD with a Create Event, Draw Event, and Step Event
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'
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
@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.

@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: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 %>

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)