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.
| $ chmod +x ./proxy_list_fetcher.rb | |
| $ ./proxy_list_fetcher.rb | head | |
| 180.94.88.58 8080 Afghanistan fast HTTPS High +KA | |
| 187.87.155.2 8080 Brazil fast HTTPS High +KA | |
| 120.132.132.119 8080 China medium HTTPS High +KA | |
| 210.211.109.244 8081 Viet Nam fast HTTP Low | |
| 216.244.71.143 3128 United States medium HTTPS High +KA | |
| 190.237.224.22 8080 Peru slow HTTPS High +KA |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'mechanize' | |
| require 'logger' | |
| class MBankHarvester | |
| URL = "https://cz.mbank.eu/" | |
| def initialize(login, password, logfile = nil) |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET / HTTP/1.1" 302 - 0.0007 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /api HTTP/1.1" 200 2845 0.0074 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /stylesheets/compiled/screen.css HTTP/1.1" 200 21012 0.0030 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /stylesheets/compiled/print.css HTTP/1.1" 200 897 0.0013 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /stylesheets/compiled/application.css HTTP/1.1" 200 25786 0.0006 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /javascripts/jquery-1.4.2.min.js HTTP/1.1" 200 72174 0.0012 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /javascripts/application.js HTTP/1.1" 200 787 0.0013 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /images/logo-wide.png HTTP/1.1" 200 8333 0.0033 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /images/topbar-bg.png HTTP/1.1" 200 72084 0.0009 | |
| 127.0.0.1 - - [16/Aug/2010 16:26:17] "GET /favicon.ico HTTP/1.1" 200 - 0.0006 |
| source "http://rubygems.org" | |
| gem "rake" | |
| gem "eventmachine" | |
| gem "haml" | |
| gem "sinatra", "0.9.4" | |
| gem "rack" | |
| gem "thin" | |
| gem "rerun" | |
| gem "json" |
| class JsonHax | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| if env['CONTENT_TYPE'] == 'application/json' | |
| env['CONTENT_TYPE'] = 'application/xml' | |
| env['REQUEST_URI'].gsub!(/\.json/, '.xml') |
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.
| In response to all the responses to: | |
| http://twitter.com/rtomayko/status/1155906157 | |
| You should never do this in a source file included with your library, | |
| app, or tests: | |
| require 'rubygems' | |
| The system I use to manage my $LOAD_PATH is not your library/app/tests |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'redis' | |
| require 'hash_ring' | |
| class RedisProcz < EventMachine::Connection | |
| def initialize | |
| @ring = HashRing.new | |
| end |
| # collect information about a running process | |
| # ruby debug.rb <pid> | |
| begin | |
| raise ArgumentError unless pid = ARGV[0] | |
| pid = pid.to_i | |
| Process.kill(0,pid) | |
| rescue TypeError, ArgumentError | |
| raise 'pid required' | |
| rescue Errno::ESRCH |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'evma_httpserver' | |
| require 'cgi' | |
| class Room < EM::Channel | |
| end | |
| $room = Room.new | |
| $welcome_html = DATA.read |