Skip to content

Instantly share code, notes, and snippets.

View kossnocorp's full-sized avatar
Shipping

Sasha Koss kossnocorp

Shipping
View GitHub Profile
// Hi! My name is loadprocess!
// I'am jQuery plugin, part of jQuery Trivial, for show information about
// loading just tell me what you want to do on loading and after that
// and i do that
//
// My bio:
// version: 0.3b (1 April, 2009)
// license: MIT
//
// My creator name is Alexander Koss (kossnocorp@gmail.com)
<ul>
<% if current_user %>
<li><%= link_to_unless_current 'Login', login_path %></li>
<li><%= link_to_unless_current 'Registration', registration_path %></li>
<% else %>
<li><%= link_to_unless_current 'Profile', profile_path %></li>
<li><%= link_to_unless_current 'Settings', settings_path %></li>
<li><%= link_to_unless_current 'Logout', logout_path %></li>
<% end %>
</ul>
module Loggable
def self.included base
base.send :extend, ClassMethods
end
module ClassMethods
def acts_as_loggable loggable = :all, rules = {}
cattr_accessor :loggable_actions, :loggable_rules
if loggable.class == Hash
script/generate delayed_job && rake db:migrate
script/delayed_job start
"*****************************************************************************"
"
" _______ _____
" || | || |
" \\_ / \\ |
" || | / /
" || | / /
" || | / /
" || | / /
" || | _/ _/
...
gem 'inherited_resources', :require_as => []
...
CSS({
'.awesome-style': {
'background': 'red',
'color': 'white'
},
'.one-more-style': {
'background': 'blue',
'text-align': 'right'
}
set :app_file, __FILE__
set :root, File.dirname(__FILE__)
set :views, 'views'
set :public, 'public'
configure do
Compass.configuration.parse \
File.join(Sinatra::Application.root, 'config', 'compass.rb')
end
module Paperclip
module Storage
module Sftp
def self.extended base
require 'net/ssh'
require 'net/sftp'
base.instance_eval do
@host = @options[:sftp_host]
@user = @options[:sftp_user]
#!/opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
require 'rubygems'
require 'json'
require 'net/http'
TOKEN = 'YOU_TOKEN'
PROJECTS = [