This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>Btn example</h2> | |
<div> | |
<canvas id="canvas" width="300" height="300"></canvas> | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example of using ngram analysis in ElasticSearch with the Tire rubygem | |
# ========================================================================== | |
# The original, raw example: https://gist.github.com/988923 | |
require 'rubygems' | |
require 'tire' | |
require 'yajl/json_gem' | |
class URL | |
def initialize(attributes={}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PixenToGameQuery | |
require 'RMagick' | |
include Magick | |
FPR = 12 # Frames per row in a sprite sheet generated by Pixen | |
COLPAD = 2 # Pix between each column of images on the sprite sheet | |
ROWPAD = 2 # Pix between each row of images on the sprite sheet | |
LEFTPAD = 4 # Extra pix on left of sprite sheet | |
RIGHTPAD = 20 # Extra pix on right of sprite sheet | |
BOTTOMPAD = 2 # Extra pix on bottom of sprite sheet |