Skip to content

Instantly share code, notes, and snippets.

Paperclip.options[:swallow_stderr] = false
" -crop '#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}' "
- semantic_form_for current_account do |f|
- f.inputs do
- f.semantic_fields_for :config_options do |config_option|
= config_option.input :name, :input_html => { :disabled => true }
= config_option.input :value, :as => option_type
- f.buttons do
= f.commit_button 'Save'
- semantic_form_for current_account do |f|
- f.inputs do
- f.semantic_fields_for :config_options do |config_option|
= config_option.input :value, :as => config_option.object.option_type.to_sym, :label => config_option.object.alias
- f.buttons do
= f.commit_button 'Save'
class Controller
attr_accessor :timer
def startTimer(sender)
@timer = Timer.new
timerThread = NSThread.alloc.initWithTarget(@timer,
selector:'startTimer:',
object:'dummy_obj' )
timerThread.start
end
end
class Timer
attr_accessor :input
def startTimer(to_process)
@startTime = Time.now
interval = NSTimer.timerWithTimeInterval 0.1,
target: self,
selector: "update_timer:",
userInfo: nil,
repeats: true
NSRunLoop.currentRunLoop.addTimer(interval, forMode: NSDefaultRunLoopMode)
class Controller
attr_accessor :timer
def startTimer(sender)
@timer = Timer.new
timerThread = NSThread.alloc.initWithTarget(@timer,
selector:'startTimer:',
object:'dummy_obj' )
timerThread.start
end
end
@fluxsaas
fluxsaas / gist:1206102
Created September 9, 2011 12:38 — forked from lightyrs/gist:1108708
lion rails 3 setup
# 2011-07-25
#
# Mac OS X 10.7
# Xcode 4.1
# Install Lion.
# Xcode
# Download Xcode from Mac App Store.
@fluxsaas
fluxsaas / Intend selected text on tab
Created May 9, 2012 07:29
Some Sample Sublime Tipps
# Documentation
* http://www.sublimetext.com/docs/2/index.html
# Tutorials
* http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
# Example Settings File
# Preferences -> Settings - User
{
"font_size": 13.0,