Search
View Article  vCard, Vpim, Version 3.0 and =0D=OA=
Vpim::InvalidEncodingError: ... =OD=0A= when parsing vcf files in ruby ...   more »
View Article  Memory Leaks in Rails
Well, it is not leaks, it's just the way how Ruby and Rails works. The problem in templates , Proc, GC and scope. Read more ...   more »
View Article  Back from UTF8 for CSV in Ruby on Rails

Rails taking care for your to handle UTF-8. How about when you need to generate a CSV file? It can't be UTF-8. It has to be one of the localized encodings. There is no javascript way to know what is a default locale on the windows client. You may assume it based on your major audience location, (still wrong assumption). ...

   more »
View Article  YAML bug with unpleasant side effect in ActiveRecord :serialize
Just demo
$ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> YAML.load(YAML.dump("\n New Paragraph\nNew Line"))
ArgumentError: syntax error on line 3, ...
   more »
View Article  Impersonating scam from hijacked gmail account
Gmail account of one of my friends got hijacked and pretty much the same minute all her contacts from contact ...   more »
View Article  Another 'work/sales' representative scam
Another 'work/sales' representative scam. Turkish company with email address on Spanish Yahoo. Apparently Finland, Cyprus and UK is not part ...   more »
View Article  Russian "Nigerian Scam"
I would never thought that russian OLIGARH'IE name will be used in the old-old scam
To: (Recipient List Suppressed)
Sender: ...   more »

View Article  Re: New Scam: SINOSTEEL TRADING

REF:KIR/02.
Dear Sir/Madam,

We avail ourselves of this opportunity to approach you for the
establishment of business relations with you. We are presently
searching for Representatives/Collection Agents who can help us
establish a medium of getting to our customers in the America,
precisely USA and Canada. If interested, Please contact us via email;
for more information. ...

   more »
View Article  ActiveMerchant, PayPal, SuccessWithWarning and alias_method_chain
ActiveMerchant Paypal gateway doesn't like 'SuccessWithWarning' from Paypal. How to handle it and save your face (or your website face)   more »
View Article  New Scam (and possible Identity theft) from pretend to be "Hartman International Co. Ltd"
The scammers and identity thefts becoming more sophisticated. That email came through google spam check and spamassassin I run locally.   more »
View Article  How to stop big file upload (Enemy at the gate) with Apache mod_rewrite
Stop big file upload before it hits your application server
  • Apache 2
  • ModRewrite
  • Ruby on Rails

When you have a form to upload a file, you may want to limit the ...

   more »
View Article  Scam with elements of social engineering. Be aware
Scam with elements of social engineering.
How scammers using craigslist  to fool you, mislead and deceive you ...   more »
View Article  Unobtrusive way to retry curl/curb based screen scraping function on Curl::Err::Error
Curl retry easy with alias_method_chain ...   more »
View Article  Ruby on rails debug shell script helper
Some time you need a debugger with ability to  step-by-step execution,
inspection and evaluation, not just watch. I use small shell script to achieve this

#!/bin/sh
mongrel-cluster stop
sleep 5
cd $ROR_HOME
/usr/bin/xterm -e "rdebug -n -- ./script/server -p 4001" &
/usr/bin/xterm -e "rdebug -n -- ./script/server -p 4002" &
/usr/bin/xterm -e "rdebug -n -- ./script/server -p 4003" &

The server will stop execution right at the line debugger if defined? Debugger


View Article  Safari "upload file" with 'unknown' content-type and Rails
I don't know how Safari identifies a content-type for the file before it uploaded (extension or magic bit). But when it failed to identify it - nothing is passed to server Example upload CSV file from Safari on Windows ...   more »
View Article  UTF-8, vCard and Ruby or how to alias class method

I need to parse uploaded vCard (vcf) file for one of the project, I am
working on. There is not that many libraries for Ruby around there.
Well, actually there is only one - vpim

Everything was working just fine with test files I found on the Internet,
until I hit the wall with vcf from Apple Address book. Few surprises:
accent characters or non US ASCII in general plus EMAIL and TEL
without a value ...

   more »
View Article  Simple way to get around ticket 3096

You need to render partial with a collection of hashes (or kind_of?). Probably you control the code, which generate the collection

...   more »
View Article  Magic of alias_method_chain - Part 1

Imagine, you have created a great module/class for rails interacting with 3rd party service provider over TCP/IP or you build a ruby extension to one of the libraries, where work with IO is done outside of the ruby itself. While you was building it you didn't pay a lot of attention to handling timeouts, network latency, IO blocks or you name it.

...   more »
View Article  Eagle point
I posted a new photo to GrandCanyon.
View Article  Hover dumb - view from helicopter
I posted a new photo to GrandCanyon.
View Article  debug rails with rdebug
When logs doesn't help to troubleshoot and you need to use an interactive debugger with rails and ruby (1.8.5)
  1. install ...   more »
View Article  auto_scope plugin for rails has_many with_scope
auto_scope plugin for rails has_many with_scope   more »
View Article  Ruby on Rails migration on empty DB with renaming/adding/removing columns in the middle
if you do rename_column/add/remove in your migration, don't forget to call reset_column_information in the changed class. Otherwise you may have a problem with running migration on an empty DB if you pre-seed data in the migration after change ...   more »
View Article  HTTP::Daemon::SSL and 2048 bytes size HTTP request body

One of our custmers noticed that our server doesn't responsd sometimes if body of the request is 2048, or 4096 ...   more »

1 Attachments
View Article  OpenSRS RCL with perl 5.8
OpenSRS RCL, perl 5.8, UTF-8 and Blowfish. How I can make it work?   more »
View Article  Ruby IO-Reactor bug

If you happens to use ruby and in particular IO/Reactor, then I think you should be aware of the ...   more »

View Article  lib fast_cgi bug (2.4.0)
Unix version of libfcgi has a nasty bug when fast_cgi process working as an external server and communication between Apache ...   more »
1 Attachments