768x90 Getting Online Shouldn't be Tough- $7.49 .com Domains at Go Daddy

How thief duplicates your credit or debit card (Full Review)

The increasing of crime about credit or debit card in 2006-2007 was in the top level. Many methods they did to get your card and any confidential information. Some victims were shocked when they read their billing statement, there's many international transactions occurred or withdrawn their card internationally. Let me explain you about technology hardware what they use (inspired from BBC TV Show about this case).

Let we see how they steal your card information from ATM Machine or Retail Store.

1. They will prepare all tools that they called skimmer, msr and wireless camera.

skimmer tools (click the image for zooming)

sample skimmer on atm card slot

wireless camera in bank brochure box


camera device at the back of brochure box


2. They put the brochure box close to ATM pin pad

camera device's hung on ATM Machine

3. Victim Comes to ATM

Victim comes to ATM and the thief sit around atm at least 100 meters


4. Thiefs watch and record Victim typing pin from their laptop

thief watch victim's typing of pin from laptop while victim insert their card to atm, the data in your black strip atm has been recorded into the skimmer device


Screen shot of camera recording in laptop


5. Thiefs record all your atm data and pin to their blank cards

blank atms will be written using msr to record all your card information and pin

MSR device

MSR remove data in laptop to card

6. Stealing card information not only in ATM but also in store or retail


Camera watch your pin typing and your card info's recorded by atm sweeper device (POS terminal) and saved into server computer.

How to See User Online on Your Web

One quite important feature of this site is a list of members who are currently online. First off this only works if you use ActiveRecord to manage your sessions. To do this you must uncomment the following line in your environment.rb file:


config.action_controller.session_store = :active_record_store
.


Then create the sessions table by running the following command from your RAILS_ROOT:

rake db:sessions:create
.


Now, whenever a user logs in to your application add their id to the session. In my app at the moment it looks something like this:
member = Member.new( @params[ :member ] )
member = Member.find( :all, :conditions => "screen_name = '#{member.screen_name}' AND password = '#{member.password}'" )
if member != nil
session[ :member_id ] = member.id
redirect_to :action => 'success'
else
redirect_to :action => 'form'
end



Now to find all of the users who are currently online it is just a matter of searching the sessions table for all the users who have been active in the last 10 minutes. This can be done using rails built in session model. Finally the session data needs to be unmarshaled and decoded. This stumped me for a while, but finally I found the answer at http://caboo.se/doc/classes/CGI/Session/ActiveRecordStore/SqlBypass.html. So here is my code to return an array of the member_ids of all the members online and active within the last 10 minutes.

def who_is_online
@whos_online = Array.new()
onlines = CGI::Session::ActiveRecordStore::Session.find( :all, :conditions => [ 'updated_at = ?', Time.now() - 10.minutes ] )
onlines.each do |online|
id = Marshal.load( Base64.decode64( online.data ) )
@whos_online << id


Have Nice Try and Good Luck

How to Modify Error_Messages_for in Production Mode


When you make an application using ruby on rails, the models will validate input of users, if error, your view will display messages from models with followed official statement like " X errors prohibited this object from being saved ". and "There were problems with the following fields:". Now you think how to change it in your own country language. What i have done is i put the script below in appz_name/app/helpers/application_helper.rb


module ApplicationHelper

def error_messages_for(*params)
options = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {}
objects = params.collect {|object_name| instance_variable_get("@#{object_name}") }.compact
count = objects.inject(0) {|sum, object| sum + object.errors.count }
unless count.zero?
html = {}
[:id, :class].each do |key|
if options.include?(key)
value = options[key]
html[key] = value unless value.blank?
else
html[key] = 'errorExplanation'
end
end
header_message = "Telah Terjadi Kesalahan, Harap Perhatikan Hal-Hal Berikut"
error_messages = objects.map {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } }
content_tag(:div,
content_tag(options[:header_tag] || :h2, header_message) << content_tag(:p, 'Daftar error:') << content_tag(:ul, error_messages), html ) else ''
end
end
end

Have Nice Try and Good Luck

How to Create number_to_currency Helper in Production Mode



You really have ever thought that "how i can change $ symbol to my country currency's symbol in production mode?", it has been happened to me. Like we have known that we can not modify Action Pack in Production Server, so the alternative is we have to make a helper to solve problem like this. And this what i do:

  1. Open appz_name/app/helpers/application_helper.rb
  2. Then write this code into it:

module ApplicationHelper

def number_to_currency(number, options = {})

options = options.stringify_keys
precision = options["precision"] || 2
unit = options["unit"] || "Rp."
separator = precision > 0 ? options["separator"] || "." : ""
delimiter = options["delimiter"] || ","

begin
parts = number_with_precision(number, precision).split('.')
unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].to_s
rescue
number
end
end
end

In view you only write like example below:
<%= number_to_currency(@my_money_in_pocket) %>
.
Result:
Rp. 50.000,00
.

Another Alternative Without creating Helper is in View you can write like this:


<%= number_to_currency(@my_money_in_pocket, :unit => "Rp. ", :precision => 2, :separator => ",", :delimiter => ".") ) %>


Have Nice Try and Good Luck

VA-Anjunabeats_100__Mixed_By_Above_And_Beyond-2CD-2008-TGX




VA-Anjunabeats_100__Mixed_By_Above_And_Beyond-2CD-2008-TGX

Disc 1/2

1. Cara Dillon vs. 2Devine - Black Is The Colour (Coco & Green Remix) 4:50
2. Super8 & Tab - Helsinki Scorchin' 2:52
3. Above & Beyond - No One On Earth (Gabriel & Dresden Club Mix) 7:07
4. Boom Jinx feat. Key - Eternal Reminiscence 6:41
5. Tranquility Base - Razorfish (Above & Beyond Progressive Mix) 4:14
6. AltF4 - AltF4 6:05
7. OceanLab - Beautiful Together 4:40
8. Sunny Lax - P.U.M.A 4:11
9. Rusch & Murray - Epic (Above & Beyond Remix) 3:01
10.Daniel Kandi - Child 4:39
11.P.O.S - Remember (Summer Sun) 4:10
12.Nitrous Oxide - North Pole 5:48
13.Aalto - Rush (Super8 vs. Orkidea Remix) 4:23
14.OceanLab - Satellite (Original Above & Beyond Mix) 5:05
15.Super8 - Alba 4:23
16.Above & Beyond - Alone Tonight 7:04

Disc 2/2

1. Anjunabeats - Volume One (Anjuna Deep Mix) 7:50
2. David West feat. Andreas Hermansson - Larry Mountains 54 4:47
3. Above & Beyond vs. Andy Moor - Air For Life 6:02
4. Aalto - 5 5:45
5. Maor Levi - Reflect 5:41
6. Signalrunners - Aria Epica (Bart Claessen Remix) 6:25
7. Luminary - Amsterdam (Smith & Pledger Remix) 6:21
8. Endre - Kallocain (Robert Nickson Remix) 3:44
9. OceanLab - Clear Blue Water (Ferry Corsten Remix) 3:58
10.Smith & Pledger - Believe (Smith & Pledger's 2004 Remix) 5:07
11.Nitromethane - Time To Die (Seraque Remix) 4:25
12.Above & Beyond pres. Tranquility Base - Surrender 6:28
13.OceanLab - Sky Falls Down (Armin van Buuren Remix) 4:50
14.Jono Grant vs. Mike Koglin - Circuits 3:40
15.Matt Hardwick vs. Smith & Pledger - Day One (Above & Beyond Remix) 4:46


VA-Anjunabeats_100__Mixed_By_Above_And_Beyond-2CD-2008-TGX.part1
VA-Anjunabeats_100__Mixed_By_Above_And_Beyond-2CD-2008-TGX.part2
VA-Anjunabeats_100__Mixed_By_Above_And_Beyond-2CD-2008-TGX.part3

Deployment Tutorial Using FastCGI (.fcgi) for Rails Application

FastCGI Process

I just want share my experience when my first time deploy rails application using FastCGI. Here's step by step of installation fastCGI for your rails application.


preparation offline

  • Already have Database and hosting server in 1 package with linux OS
  • Already Complete ruby on rails application
  • export your database to file or dump your database to external file.
  • Go to your appz_name/config/environment.rb. You need to uncomment the following line to confirm you're in production mode:
ENV['RAILS_ENV'] ||= 'production'
  • Modify your appz_name/public/.htaccess file by changing some parts to the following below:
# General Apache options
#AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
...
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#if you see RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
#in your file, change it to like below
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

  • Set up your database in your hosting or db server online, create 3 databases, after that match it to appz_name/config/database.yml if you found difference setting, fix it. Your database.yml must be the same like your setting in database server including database password, username, database name.
  • Now, the last step, go to appz_name/public you will see 3 files with named dispatch*.*. Open them and change their first line to be
#!/usr/local/bin/ruby
  • edit your routes.rb in appz_name/config/and uncomment :
map.connect '', :controller => "your_main_controller_name"
  • delete or rename your index.html in appz_name/public
  • Attach or archive your app project folder in zip or tar.tgz.


preparation online


  • use your putty to access your shell console account of your hosting. After logged, Go to your /home/username upload your attached app project folder to this area then extract it.
  • your will get your project rails folder from your extracted file.
  • Back up your existed public_html :
mv ~/public_html ~/public_html_backup
  • I forget to tell you the most important thing, that is you must chmod 755 dispatch*.* in your /home/username/appz_name/public
  • after that back to /home/username and run it:
ln -s ~/yourapp/public ~/public_html

Done !!! If you did all those steps correctly you will not see Application Error message in your browser. Have nice try and good luck.

About Yacobus Reinhart

I am very passionated and challenged to user friendly, clean and elegant application (web & desktop).  There's no thing that can satisfy me unless I have to defeat all problems in the project and deliver it perfectly.
I am standalone developer, analyst and software consultant both desktop and web base, My strong foundations are Adobe air and Flex 3 and 4, Ruby on Rails 2.4x and 3.x, CakePHP and JQuery since 2007.

 My background experiences like working in great companies, bachelor degree Informatics Engineering and unique client's cases more and more place me on solid skills in software world.
Please feel free to contact me on gmail or business mail or participating in my blog for any discussion, questions or idea, i will be freely to assists you with all my best.

Best Regards,

yacobus@reinhartlab.com (business) or yacobus.reinhart@gmail.com (home)

www.twitter.com/yreinhart

http://id.linkedin.com/pub/yacobus-reinhart/1b/aa5/220

Active Record - Session 1


Ruby is not Unidentified Programing Object, but it is Universal Programing Object


As we know that rails is built by MVC design. Let we understand MVC (Model-View-Controller) instantly.



  • Model contains all information of operations or tasks that corresponding to process your database like CREATING, READING, DESTROYING, and UPDATING your database. Transaction Support and Store Procedure are created in Model too. But Transaction Object is in Controller.

  • View, it's all about display of your information or output of process. Your webdesign, information that want be displayed to realworld or user and output of data process are managed in View files.

  • Controller is brain of everything. Like the name, it controlls all process and also filter for all information of input or output. example before data displaying to realworld/ your user, it should pass controller first .

So where is Active Record in Ruby on Rails? it is in model. Active Record is Ruby Library that allows your Ruby programs to transmit data and commands to and from various data stores,whic are usually relational database. If you dont have Active Record, dont go away. Calm down and type this gem install activerecord to your ruby cmd. Let's implement it.


Create a Record


email = Email.new
email.username = "teapoci"
email.password = "myfav_tea"
email.customer_name ="Ariand Handsome"
email.customer_country = "Indonesia"
email.save

The generated SQL would be

INSERT INTO emails ('username', 'password', 'customer_name') VALUES ('teapoci', 'myfav_tea', 'Ariand Handsome')



Reading a Record

all_email = Email.find(:all)
first_email = Email.find(:first)
email_by_id = Email.find(10)

The generated SQL would be

SELECT * FROM emails;
SELECT * FROM emails LIMIT 1;
SELECT * FROM emails WHERE id = 10;


How to use :conditions

Email.find(:all, :conditions => ["customer_country = ?", "Indonesia"] )
Email.find(:all, :conditions => [:customer_country => "Indonesia" )
Email.find(:all, :conditions => "customer_country => 'Indonesia' "

The generated SQL would be

SELECT * FROM Emails WHERE customer_country = 'Indonesia'

-------------------------
---------------------------------------------------------------------------

Email.find(:all, :conditions => ["customer_name LIKE ? AND customer_country != ?", "%ar%", "Indonesia"] )

The generated SQL would be

SELECT * FROM emails WHERE
customer_country LIKE '%ar%' AND customer_country NOT IN ('Indonesia');


How to use :include

:include is like join table in SQL, it will look like nested hash of ruby in its script.



class Customer < ActiveRecord::Base

has_many :invoices

end



class Invoice < ActiveRecord::Base

belongs_to :payment

end



class Payment < ActiveRecord::Base

belongs_to :processor

end



class Processor < ActiveRecord::Base

end



Customer.find(:all. :include => { :invoices => {:payments => {:processor = > {} } } }, :conditions => ["processor.name != ?", "paypal"])





The generated SQL would be

SELECT * FROM customers
LEFT OUTER JOIN invoices ON customer.id = invoices.customer_id
LEFT OUTER JOIN payments ON invoices.payments_id = payments.id
LEFT OUTER JOIN processors ON payments.processor_id = processor.id
WHERE processors.name NOT IN ('paypal');


How to use :order

Costumer.find(:all, :order => "created_on DESC, last_name, first_name")

The generated SQL would be

SELECT * FROM customers ORDER BY created_on DESC, last_name, first_name


How to use :select

Costumer.find(:all, :select => "customers.last_name, 'family name' " )

The generated SQL would be

SELECT last_name AS 'family name' FROM customers;


How to use :group

Costumer.find(:all, :group => "state" )

The generated SQL would be

SELECT * FROM customers GROUP BY state;



How to use :joins

Costumer.find(:all, :joins => "LEFT JOIN invoices ON customers.id = invoices.customer" )

The generated SQL would be

SELECT * FROM customers LEFT JOIN invoices ON customers.id = invoices.customer_id


How to use :from

Costumer.find(:all, :group => "state" )

The generated SQL would be

SELECT * FROM customers GROUP BY state;


to be continued....


Portable Ruby - As Easy as Ruby did

Hmm.... Ruby is very interesting programing language. I am one of thousands ruby fanatics. I am mobile person, when i am in cyber cafe and want finish my ruby job, i have to install ruby, gems and also database, very tired of work and full wasting time. Let's fight it and make your self more confidence with ruby where ever you are.

"Ruby really made me stronger..." - Bruce Lee - 1970



Let see step by step how to install Portable Ruby to your FlashDisk or USB Drive.
  1. You should have a downloaded ruby installation first. I prefer to use one-click-installer , but dont install it, just download it 'till finish.
  2. Let's Download RubyPortable Template and extract it to your USB Drive or Flashdisk. I advice you to use flashdisk or any mobile drive with space more than 512 MB. Because Ruby will take space 80MB.


  3. Taking from the picture above. Let install one-click-installer to J:/RubyPortable/App/ruby/ , if you see alert message to remove folder ruby, choose 'Yes'.
  4. Honestly, at this way you can use portable ruby. If you want make ruby on rails, you should update gem, you can install also sql portable to support your work or use external database like in webhosting you have. Let's run J:/RubyPortable/RubyPortable.exe and you will get this (if not works, go to step 5)


  5. But because RubyPortable allows saving a lot settings (one or all of them at once):
    - One or more registry keys
    - One or more settings directories
    - One or more settings files
    You can go to the next step.
  6. we Now, let we install plugin for running our RubyPortable and sCite, you should download the following files: NullSoft Installer, HM NIS EDIT(script editor for installer), NewAdvSplash plug-in, Registry plug-in, FindProc plug-in
  7. Install NullSoft Installer and HM NIS EDIT in any folders of your windows.
  8. After you download NewAdvSplash in zip file. Find file with name - filenewadvsplash.dll and copy it to folder plugin where you installed NSIS is.
  9. Extract Registry plug-in and you will get fold desktop, and run install.exe
  10. Now the last step extract and copy FindProcDLL.dll to the NSIS plugins directory.
  11. After you complete all those steps, open your HM NIS editor and open the file RubyPortable.nsi that located in folder J:\RubyPortable\Other\RubyPortableSource.
  12. Closer to the top you will see "Define constants " you can set as you want. If you want this as a default setting, you can compile it as CTRL+F9


  13. Now Your Portable Ruby can be used. You can install rails or gem. To edit ruby file you can use Scite Or Notepad :p
  14. For more information : In most cases, all you would need to do is update the constant definitions at the top of the script. Based on these values, the created launcher can make changes to the system registry or settings, launch the target program, and restore the registry and settings to their original values when the program closes.

    I prefer to avoid changing the registry or system settings at all costs so as not to cause any problems on the host PC should problems arise. Our problem then becomes, how do we open a command window with the PATH environment variable correctly set when the PATH is a value maintained in the Windows Registry.

    A simple option would be to set the value of the constant "EXE" in the script to reference a file named "bin\ruby.cmd". This file doesn't exist in the Ruby distribution but we could create one that then opens a new command window with arguments for setting the PATH. We can also go ahead and update our script to perform the same action. Here is the updated entry in RubyPortable.nsi (line 395) which will do that.

ExecWait "$SYSDIR\cmd.exe /K set PATH=$EXEDIR\App\${APP}\bin;%PATH%"



References:
http://ruby.about.com/od/resources/ss/portable_ruby.htm
http://portableapps.com/node/2022

Portable SQL - Compatible with any mobile storage

Laptop is not a small stuff, you need something that is smaller and demulcent your self. I think flashdisk is nice storage to save many of applications and data. But how if you face with big data like your database or webhost? how much money you spend to buy hosting for uploading your data there? or is it possible to finish your application that support database but you dont have database there? dont you think that portability is the right answer for you, programmer, who is very mobile?

Server2Go maybe can help you in this problem. Server2Go has all you need to get your Webapplication running

  • Apache 1.3.x, 2.0.x and 2.2.x (V1.6.0 off Server2Go or greater)
  • PHP 5.2.x with a lot of Extensions. Downgrade packages to 4.4.x and 5.0.x available)
  • MySQL 5 support
  • Perl 5.8 with a lot of CPAN modules integrated
download here

 
powered by Blogger