Ubuntu 12, i686.
- Для начала проверяем выдачу команды
convert -list configure
.
Expected result (по полной):
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms openexr png rsvg tiff x11 xml wmf zlib
/* | |
Input.jump = { | |
key: 32//Space | |
gamepad: 0// A button on as XBOX360 gamepad | |
} | |
dont forget to call | |
Input.update(); | |
at the end of each frame. |
# lib/tasks/custom_seed.rake | |
namespace :db do | |
namespace :seed do | |
Dir[File.join(Rails.root, 'db', 'seeds', '*.rb')].each do |filename| | |
task_name = File.basename(filename, '.rb').intern | |
task task_name => :environment do | |
load(filename) if File.exist?(filename) | |
end | |
end | |
end |
module Appdata | |
# we don't want to instantiate this class - it's a singleton, | |
# so just keep it as a self-extended module | |
extend self | |
# Appdata provides a basic single-method DSL with .parameter method | |
# being used to define a set of available settings. | |
# This method takes one or more symbols, with each one being | |
# a name of the configuration option. | |
def parameter(*names) |
# Rails Engine call | |
`rails plugin new MY_ENGINE --dummy-path=spec/dummy --skip-test-unit --full --database=mysql` | |
or `rails plugin new ENGINE_NAME --dummy-path=spec/dummy --skip-test-unit --mountable --database=mysql` | |
# Configure spec_helper.rb | |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path("../dummy/config/environment.rb", __FILE__) | |
require 'rspec/rails' |
var f_ready = function() { | |
var $aa = $('h3.r > a'); | |
//console.log($aa); | |
var ptr = 0; | |
$(document).keydown(function(e) { | |
//console.log(e.keyCode); // tab keyCode = 9 | |
require 'redis' | |
redis = Redis.new | |
redis.flushall | |
puts 'FLUSHALL...' | |
redis.hmset('account:1', | |
'id', '1', | |
'nickname', 'Alex', | |
'full_name', 'Alex Alex', |
express = require 'express' | |
redis = require 'redis' | |
app = express() | |
requestCount = 0 | |
client = null | |
#Going to use Date as the Key | |
getKey= -> | |
d = new Date() |
# 100mil 'entities' | |
# need to be able to check from a random subset if 'something' is TRUE or FALSE | |
# set booleans in a redis bitmap where the ID for the entities are the offset | |
$ redis-cli | |
> SETBIT mybitmap 100000000 1 # 8ms | |
> SETBIT mybitmap 99999999 1 # 2ms | |
> SETBIT mybitmap 10000000 1 # 2ms, etc |
class Utils | |
def self.merge_by_id(arr1, arr2) | |
arr = arr1 + arr2 | |
arr = arr.group_by { |h| h[:id] } | |
arr.map do |kk, value| | |
value[1].each_key do |k| | |
value[0][k] = value[1][k] | |
end | |
value[0] | |
end |