most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile" | |
gem 'jwt' |
# this stuff goes in config/initializers/active_admin.rb | |
ActiveAdmin.setup do |config| | |
# ... | |
# put these lines in the "Controller Filters" section of the ActiveAdmin.setup block | |
# These two are defined in ActiveAdmin::FilterSaver::Controller, which is loaded below. | |
config.before_filter :restore_search_filters |
user www-data www-data; | |
worker_processes 4; # Rule of thumb is 1 process per core. | |
error_log logs/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
ENV["PATH"] = "/opt/ruby/bin:#{ENV['PATH']}" | |
ENV["RAILS_ENV"] = "production" | |
ENV["QUEUE"] = "*" | |
Bluepill.application("nichelator") do |app| | |
app.working_dir = "/var/apps/nichelator/current" | |
app.uid = "app" | |
app.gid = "app" | |
2.times do |i| | |
app.process("resque-#{i}") do |process| |
# app/uploaders/avatar_uploader.rb | |
process :fix_exif_rotation | |
process :strip | |
process :resize_to_fill => [1024, 768] | |
process :quality => 90 # Percentage from 0 - 100 |
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone"); |
class GalleryImage < ActiveRecord::Base | |
belongs_to :property | |
has_attached_file :image, :styles => {:small => "300x300#", | |
:medium => "575x420>", | |
:small_thumb => "95x95#", | |
:thumb => "100x100#", | |
:large => "550x550>", | |
:featured => "296x477!"}, | |
:default_style => :small, | |
:processors => [:rotator] |
class Tableless < ActiveRecord::Base | |
def self.column(name, sql_type = nil, default = nil, null = true) | |
columns << ActiveRecord::ConnectionAdapters::Column.new( name.to_s, default, sql_type.to_s, null ) | |
end | |
def self.columns() | |
@columns ||= []; | |
end |