To list what crons are installed:
crontab -e
whenever gem is integrated with Capistrano.
gem 'whenever', require: false
wheneverize .
bundle exec wheneverize .
config/schedule.rb
Add:
every 1.day, at: '4:30 am' do
rake 'clear_cache'
end
task clear_cache: :environment do
Rails.cache.clear
end
bundle exec whenever
Backup prod db
Populate download geo co-ordinates once every day
When payment fails, send email using ActionMailer
For Capistrano integration, in config/deploy.rb:
require 'whenever/capistrano'
Sunday, April 30, 2017
Friday, April 28, 2017
Thursday, April 27, 2017
Upgrading Passenger from 5.0 to 5.1 using Moonshine
Change the BLESSED_VERSION to 5.1 and cap deploy.
Monday, April 24, 2017
jQuery Turbolinks Stripe Subscription Problem
https://github.com/kossnocorp/jquery.turbolinks is a possible fix, the problem is that it is not compatible with newer versions of Turbolinks.
The workaround is to either not use different application layout files (one with stripe.js and one without stripe.js), so you have only one layout that has stripe.js or you can have two layouts but still include stripe.js on both. Eventhough only your payment pages need the stripe.js and results in a little duplication and might affect the performance in a very negligible amount, this will prevent the Turbolinks problem.
If you had used Rails cache to cache the pages, you must invalidate the cache by running in production:
This will force the page to pickup the changes made to the layout files, otherwise you will see the latest file in the production but the browser will not see the updated file.
The workaround is to either not use different application layout files (one with stripe.js and one without stripe.js), so you have only one layout that has stripe.js or you can have two layouts but still include stripe.js on both. Eventhough only your payment pages need the stripe.js and results in a little duplication and might affect the performance in a very negligible amount, this will prevent the Turbolinks problem.
If you had used Rails cache to cache the pages, you must invalidate the cache by running in production:
Rails.cache.clear
This will force the page to pickup the changes made to the layout files, otherwise you will see the latest file in the production but the browser will not see the updated file.
Tuesday, April 18, 2017
Upgrading Passenger from 5.0 to 5.1 using Moonshine
Change passenger version in passenger.rb:
BLESSED_VERSION = '5.1.2'
Checkin the file and cap deploy. This version of passenger turns on XSS security header:
BLESSED_VERSION = '5.1.2'
Checkin the file and cap deploy. This version of passenger turns on XSS security header:
X-XSS-Protection: 1; mode=block
Thursday, April 13, 2017
Making the Transition from Blogger to an Author
How did I make the transition from writing blog posts to a book author? Initially I was writing only 'How-To' articles that focused on helping the reader get a specific result. Over time, as I wrote more I gained more confidence and I was able to write more articles in less time. However, writing a book is more involved than writing blog posts. I am not a native English speaker. It pushed me beyond my writing abilities. Since I did not have any training in writing, I searched for resources on how to write technical books. I had to learn some techniques that helped me write the book during the time I worked on the TDD in Ruby book. Today, I am going to share with you one of the techniques that I learned during the time I wrote the book. I had the main bullet points and I used Semantic Maps to expand the main points to a paragraph.
Semantic maps are webs of words. The purpose of creating a map is to visually display the meaning-based connections between a word or phrase and a set of related words or concepts.
I would take the main point, research the topic and draw the semantic map that connects all the concepts. I would then eliminate the concepts that are not relevant to the analogy that I need to explain the main idea. I revised the diagram over the course of few days. Then I write a paragraph by referring the semantic map. I revise the paragraph several times. I keep all the paragraphs next to each other so that I can compare and finally pick the one that I am satisfied with.
The following diagram shows the semantic map for the music analogy that I used in the book. The music-semantic-map-1 shows how the music is related to other concepts. The concepts are connected by arrows and the relationship is written next to the arrows. The music-semantic-map-2 is the continuation of the map that connects the Performer to musical instruments.
I also drew semantic maps for programming as shown in program-semantic-map-0 and program-semantic-map. I compare the semantic maps that captures the essence of creating music with creating computer programs, I look for things that are similar to make the analogy clear.
Comparison of semantic maps helps us to find missing concepts in the paragraph that expands the main idea. I found semantic maps very helpful because I don't need to worry about grammar when I am drawing them. The main focus is in finding the essential relationships between the concepts. Once I nailed the relationships between the concepts then I worry about the grammar and the sequence of the sentences to form a paragraph. The TDD in Ruby book is written to be practical introduction TDD for Ruby developers. I hope you enjoy this book as much as I enjoyed writing it.
Friday, April 07, 2017
Ruby on rails Developer - Palo Alto
Rate can be over $100 for the right candidate. If interested, email me at bparanj at gmail dot com.
Job Details:
Position: Sr.Software Engineer (Ruby on rails Developer)
Position: Sr.Software Engineer (Ruby on rails Developer)
Location: Palo Alto, CA
Duration: 3+ Months contract with possibility of Extension
Duration: 3+ Months contract with possibility of Extension
Job Description:
Responsibilities:
· Create progressive solutions to solve complex test automation challenges.
· Collaborate with the QA team to architect, develop, and maintain an innovative test automation system for the organization, with respect to functionality, performance, scalability and other quality goals.
· Apply Development and QA Best Practices and actively look for process improvement opportunities.
· Develop and maintain automated test systems.
· Mentor and assist QA Engineers in the use of automation tools.
· Maintain test environments and test automation systems (install/update software on remote and/or virtual systems).
· Provide feedback to internal teams on application flexibility, consistency, and user-friendliness, and provide information to help business stakeholders make the best decisions possible.
· Provide the team with risk assessment and risk mitigation strategies.
· Research, analyse, report, and track defects through completion.
Skills & Requirements
Education:
· Bachelor's degree in Computer Science / Information Systems or an equivalent combination of education and work experience.
Qualifications:
Skills:
· 5+ years of development / test automation experience, preferably with complex web applications using Ruby or other OO languages.
· 3+ years of experience working specifically in or with QA teams.
· 3+ years of experience with SQL (MySQL preferred).
· Knowledge of Windows / Linux / OS X operating systems is a plus.
· Familiarity with Agile development principles is a plus.
· Desire to learn from and mentor other team members, including paired programming practices.
· Demonstrated ability to become a subject matter expert.
· Knowledge and experience with Continuous Integration, Continuous Build and Continuous Deployment practices, tools and trends.
· Experience with virtualization technologies such as VMWare, Hyper-V, OpenStack, etc. preferred.
· Understanding of SaaS infrastructure and components (RDBMS, Web and Application Servers, Queues, Caching, etc.).
· Experience with Ruby is preferred.
· Working knowledge of Ruby on Rails and ability to read and interpret intent in a large application is a huge plus.
· Experience with source code revision control systems such as GIT or SVN.
· Highly detail oriented and well organized.
· Strong analysis and problem-solving skills.
· Ability to identify small inconsistencies throughout a complex system.
· Excellent interpersonal skills, ability to work as part of a team.
· Must be self-motivated and take initiative in performing tasks and growing skills and knowledge.
· Ability to effectively communicate information, both verbally and written, to team members and management.
Thursday, April 06, 2017
Sunday, April 02, 2017
How to move contacts from Android
Open Contacts, click on ... and click on Move device contacts to, you can select Google and your contacts will be moved to your Google account.
Subscribe to:
Posts (Atom)