A double-entry accounting system for Rails (inspired by http://www.cuppadev.co.uk/oldbrew/double-entry-accounting-in-rails/)
A basic accounting software, written in Ruby, using the Rails framework. UI in French.
require 'httparty' | |
require 'grit' | |
require 'pathname' | |
module Wikipedia | |
class Revision | |
def initialize(article, revision) | |
@article = article | |
@revision = revision |
A double-entry accounting system for Rails (inspired by http://www.cuppadev.co.uk/oldbrew/double-entry-accounting-in-rails/)
A basic accounting software, written in Ruby, using the Rails framework. UI in French.
This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.
OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.
~/chef-repo(master) $ knife bootstrap 192.168.0.132 | |
Bootstrapping Chef on 192.168.0.132 | |
Failed to authenticate root - trying password auth | |
Enter your password: | |
192.168.0.132 [Wed, 23 Jun 2010 04:08:48 -0400] INFO: Client key /etc/chef/client.pem is not present - registering | |
192.168.0.132 [Wed, 23 Jun 2010 04:08:49 -0400] WARN: HTTP Request Returned 401 Unauthorized: Failed the authorization check | |
192.168.0.132 /usr/lib/ruby/1.8/net/http.rb:2101:in `error!': 401 "Unauthorized" (Net::HTTPServerException) | |
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:216:in `api_request' | |
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:267:in `retriable_rest_request' | |
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:197:in `api_request' |
.bar | |
.fill{:style => "width: #{(percent_full*100).round}%"} |
#!/usr/bin/env ruby" | |
require 'rake/clean' | |
require 'rake/testtask' | |
task :default => :test | |
Rake::TestTask.new(:test) do |t| | |
t.warning = true | |
t.verbose = false |
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
require 'md5' | |
class Chargify::HooksController < ApplicationController | |
protect_from_forgery :except => :dispatch | |
before_filter :verify, :only => :dispatch | |
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze | |
def dispatch | |
event = params[:event] |
Gemfile.lock merge=bundlelock | |
db/schema.rb merge=railsschema |
after 'deploy:update_code' do | |
system("mkdir -p tmp && git diff --staged > #{rails_root}/tmp/staged.diff") | |
put File.read("#{rails_root}/tmp/staged.diff"), '/tmp/staged.diff' | |
run "cd #{latest_release} && if test -s /tmp/staged.diff; then git apply /tmp/staged.diff; fi" | |
end |