Skip to content

Instantly share code, notes, and snippets.

DanBradbury / gist:8852791
Last active Aug 29, 2015
Rails 2 Asset issue
View gist:8852791

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 %>
View gist:9074075

@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 / gist:10208060
Last active Aug 29, 2015
Scraping Google Images
View gist:10208060

Cause we swag like that

page = agent.get('')

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


The image we want is so we are still pretty far off.

View gist:10298200
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
View gist:e2203fa2c7cc68fc7fbb
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'
View gist:dd203fa579f3228e37c7

#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
View EP1 Notes
COLORS[0] = c_aqua;
COLORS[1] = c_fuchsia;
COLORS[2] = c_red;
COLORS[3] = c_lime;
RATIO = 1;
View gist:07bafe26a5cdfdc24c60

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_text(x,y,"Hello World");
View gist:81de7492b5e120a30767


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

RATIO = 1;
DanBradbury /
Last active Aug 29, 2015
Episode 3: Sprites sprites sprites

##Basics of Working with Sprites In order to get the most out of Sprites we will undoubtedly want to add some animation and control to bring our objects to life.

In this episode we will take a look at the core of sprite control within Objects. We will also take a look at working with sprite sheets and using the built in Sprite Editor tool.

We will start with a single sprite spr_player that we control from a top down perspective through our obj_payer. Even though the player is moving around in the room we want to sync up some animation with the players input.

In order to do this we need to add the appropriate sprites for each of the movements that we will be using in our object. Luckily artists have given us the sprite sheet which is a clever way to shove all the relevant sprites we need onto 1 image.

For this project we will be using the artwork for the Liberated Pixel Cup and because we want