Skip to content

Instantly share code, notes, and snippets.

View tanelsuurhans's full-sized avatar

Tanel Suurhans tanelsuurhans

  • ID.me
  • United States
View GitHub Profile
def minimum_bet_validation
errors.add(:base, _("minimum_bet", :value => 10)) if name == Setting::MINIMUM_BET && value.to_i < 10
end
if value.to_i < 10
@tanelsuurhans
tanelsuurhans / gist:3930087
Created October 22, 2012 07:19
SHM calculation script
#!/usr/bin/env ruby
def halt
puts "----------------------------------"
puts " Usage "
puts "----------------------------------"
puts "./shm.rb <size> <units>"
puts "\tsize = integer > 0"
puts "\tunits = MB or GB"
exit
$ ->
if $('h1.claim a').length > 0
$.mobile.ajaxEnabled = false
if $('.purchase_form').length > 0
$.mobile.ajaxEnabled = false
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
[2012-02-19 01:10:49] make
CC = /usr/bin/gcc-4.2
LD = ld
LDSHARED = /usr/bin/gcc-4.2 -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin11.3.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/tanel/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
[2012-02-19 01:03:40] make
CC = clang
LD = ld
LDSHARED = clang -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin11.3.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/tanel/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
uby-1.9.3-p0 :004 > I18n.t("number.format")
=> {:separator=>",", :delimiter=>" ", :precision=>2, :significant=>false, :strip_insignificant_zeros=>false}
ruby-1.9.3-p0 :005 > I18n.t("number.format", :default => {})
=> {}
= link_to "#" do
%i.icon-question-sign
Ask a Question
sampler TextureSampler = sampler_state {
texture = <TextureFile>;
magfilter = LINEAR;
minfilter = LINEAR;
mipfilter = LINEAR;
AddressU = CLAMP;
AddressV = CLAMP;
};