I hereby claim:
- I am oren on github.
- I am oren (https://keybase.io/oren) on keybase.
- I have a public key whose fingerprint is 411A 3267 0515 3D9A D33F 10DD 73BF 6EA3 1BE4 B582
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
body { | |
color: red; | |
color: blue; | |
} |
var Chartist = require("chartist") | |
/* Add a basic data series with six labels and values */ | |
var data = { | |
labels: ['1', '2', '3', '4', '5', '6'], | |
series: [ | |
{ | |
data: [1, 2, 3, 5, 8, 13] | |
} | |
] |
----------------------------------------------------------- Class: Array | |
Convert and array into a tuple. | |
------------------------------------------------------------------------ | |
helper to check for method existance in ruby 1.8- and | |
1.9-compatible way because `methods`, `instance_methods` and others | |
return strings in 1.8 and symbols in 1.9 | |
['foo', 'bar'].include_method?(:foo) # => true |
ssue model on the client side | |
class Issue < ActiveResource::Base | |
self.site = 'http://localhost:3000' | |
self.user = 'admin' | |
self.password = 'admin' | |
end | |
Retrieving issues | |
issues = Issue.find(:all) | |
puts issues.first@ |
the plugin: | |
http://github.com/tamoyal/simple_time_select#readme | |
in the view: (u don't have to use date_select, but i needed it) | |
<%= f.date_select :published_at %> | |
<%= f.time_select :published_at, | |
{ :default => Time.now.change(:hour => Time.now.hour), | |
:simple_time_select => true, | |
:minute_interval => 30, |
ruby colfm.rb | |
/opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:61:in `ffi_lib': Could not open library 'libncursesw.so': libncursesw.so: cannot open shared object file: No such file or directory. Could not open library 'ncursesw': ncursesw: cannot open shared object file: No such file or directory (LoadError) | |
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `map' | |
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `ffi_lib' | |
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:23 | |
from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' | |
from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' | |
from colfm.rb:17 |
require 'rubygems' | |
require 'ffi-ncurses' | |
include FFI::NCurses | |
begin | |
stdscr = initscr | |
start_color | |
curs_set 0 | |
raw | |
cbreak | |
noecho |
def bind_hotkey | |
if !@mnemonic.nil? | |
ch = @mnemonic.downcase()[0] ## FIXME 1.9 | |
puts("test") | |
# meta key | |
mch = ?\M-a + (ch - ?a) | |
if @label_for.is_a? RubyCurses::Button and @label_for.respond_to? :fire | |
@form.bind_key(mch, @label_for) { |_form, _butt| _butt.fire } | |
else | |
$log.debug " bind_hotkey label for: #{@label_for}" |